From e618a90dffe6c23a12f6f219683ed953068245b3 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Thu, 11 Jul 2013 18:17:41 +0200 Subject: [PATCH] Fix easy-click behaviour during fullscreen Don't swallow mouse clicks in fullscreen applications when the easy-click modifier is held down. --- src/events.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/events.c b/src/events.c index 4b49171..879df77 100644 --- a/src/events.c +++ b/src/events.c @@ -879,6 +879,7 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev) Window win; guint state, part; gboolean replay; + gboolean easy_click_effective; TRACE ("entering handleButtonPress"); @@ -889,26 +890,27 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev) state = ev->state & MODIFIER_MASK; win = ev->subwindow; screen_info = c->screen_info; + easy_click_effective = (state) && (state == screen_info->params->easy_click) && !(FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN)); - if ((ev->button == Button1) && (state) && (state == screen_info->params->easy_click)) + if ((ev->button == Button1) && (easy_click_effective)) { button1Action (c, ev); } - else if ((ev->button == Button2) && (state) && (state == screen_info->params->easy_click)) + else if ((ev->button == Button2) && (easy_click_effective)) { clientLower (c, None); } - else if ((ev->button == Button3) && (state) && (state == screen_info->params->easy_click)) + else if ((ev->button == Button3) && (easy_click_effective)) { part = edgeGetPart (c, ev); edgeButton (c, part, ev); } #if 0 /* Binding the alt+scroll wheel to switch app/window is not handy, disabling for now */ - else if ((ev->button == Button4) && (state) && (state == screen_info->params->easy_click)) + else if ((ev->button == Button4) && (easy_click_effective)) { clientSwitchWindow (); } - else if ((ev->button == Button5) && (state) && (state == screen_info->params->easy_click)) + else if ((ev->button == Button5) && (easy_click_effective)) { clientSwitchApp (); } -- 1.7.11.7