[PATCH weston 1/2] desktop-shell: maximize the surface with the kbd focus

pochu27 at gmail.com pochu27 at gmail.com
Wed Jan 29 02:11:12 PST 2014


From: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 111a7aa..7d85a7b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3830,7 +3830,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;
 
@@ -3854,7 +3854,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;
 
-- 
1.8.5.3



More information about the wayland-devel mailing list