desktop-shell: maximize the surface with the kbd focus
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 29 Jan 2014 10:11:12 +0000 (11:11 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 1 Feb 2014 09:26:34 +0000 (01:26 -0800)
We don't have focus-follows-mouse, so it makes more sense to
maximize or fullscreen the surface that has the keyboard focus,
not the one behind the pointer.

desktop-shell/shell.c

index c275543..756bbdc 100644 (file)
@@ -3832,7 +3832,7 @@ move_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void *dat
 static void
 maximize_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void *data)
 {
-       struct weston_surface *focus = seat->pointer->focus->surface;
+       struct weston_surface *focus = seat->keyboard->focus;
        struct weston_surface *surface;
        struct shell_surface *shsurf;
 
@@ -3856,7 +3856,7 @@ maximize_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void
 static void
 fullscreen_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void *data)
 {
-       struct weston_surface *focus = seat->pointer->focus->surface;
+       struct weston_surface *focus = seat->keyboard->focus;
        struct weston_surface *surface;
        struct shell_surface *shsurf;