From 32c0b20f41c8fc2f84d75dc076d38f1429f329ac Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 9 Mar 2014 02:11:47 +0200 Subject: [PATCH] xfwm4: add easy_click hack This hack passes click event to fullscreen window even when window move modifier is held. --- .../xfwm4_no_easy_click_for_fullscreen.patch | 40 +++++++++++++++++++ recipes/xfce-base/xfwm4_4.6.2.bb | 6 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 recipes/xfce-base/xfwm4/xfwm4_no_easy_click_for_fullscreen.patch diff --git a/recipes/xfce-base/xfwm4/xfwm4_no_easy_click_for_fullscreen.patch b/recipes/xfce-base/xfwm4/xfwm4_no_easy_click_for_fullscreen.patch new file mode 100644 index 0000000000..2305a865da --- /dev/null +++ b/recipes/xfce-base/xfwm4/xfwm4_no_easy_click_for_fullscreen.patch @@ -0,0 +1,40 @@ +diff -ur /tmp/xfwm4-4.6.2/src/events.c ./src/events.c +--- xfwm4-4.6.2/src/events.c 2014-03-08 23:10:09.040351189 +0200 ++++ xfwm4-4.6.2/src/events.c 2014-03-09 00:47:37.061073583 +0200 +@@ -908,6 +908,7 @@ + Window win; + int state, part; + gboolean replay; ++ gboolean easy_click; + + TRACE ("entering handleButtonPress"); + +@@ -919,15 +920,25 @@ + win = ev->subwindow; + screen_info = c->screen_info; + +- if ((ev->button == Button1) && (screen_info->params->easy_click) && (state == screen_info->params->easy_click)) ++ easy_click = (screen_info->params->easy_click) && (state == screen_info->params->easy_click); ++ ++ // XXX: how to check for fullscreen? ++ if (c->x == 0 && c->y == 0 && c->width == screen_info->width ++ && c->height == screen_info->height ++ && !(c->xfwm_flags & XFWM_FLAG_HAS_BORDER)) ++ { ++ easy_click = FALSE; ++ } ++ ++ if ((ev->button == Button1) && easy_click) + { + button1Action (c, ev); + } +- else if ((ev->button == Button2) && (screen_info->params->easy_click) && (state == screen_info->params->easy_click)) ++ else if ((ev->button == Button2) && easy_click) + { + clientLower (c, None); + } +- else if ((ev->button == Button3) && (screen_info->params->easy_click) && (state == screen_info->params->easy_click)) ++ else if ((ev->button == Button3) && easy_click) + { + part = edgeGetPart (c, ev); + edgeButton (c, part, ev); diff --git a/recipes/xfce-base/xfwm4_4.6.2.bb b/recipes/xfce-base/xfwm4_4.6.2.bb index 87a492b3a5..30c41cc200 100644 --- a/recipes/xfce-base/xfwm4_4.6.2.bb +++ b/recipes/xfce-base/xfwm4_4.6.2.bb @@ -2,10 +2,14 @@ DESCRIPTION="Xfce4 Window Manager" SECTION = "x11/wm" -PR = "r1" +PR = "r2" inherit xfce46 update-alternatives +SRC_URI += " \ + file://xfwm4_no_easy_click_for_fullscreen.patch;patch=1 \ +" + FILES_${PN} += "${datadir}/xfwm4/defaults ${datadir}/xfwm4/themes/default.keys/*" DEPENDS = "startup-notification virtual/libx11 libxpm libxfce4util libxfcegui4 libwnck" -- 2.39.5