Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-12-16 22:19:52

nneul
Member
Registered: 2012-12-16
Posts: 1

How to disable edge-of-window/border double click behavior?

xfwm 4.8.3
Fedora 17

I'm looking to disable the "right at the edge" double click behavior that causes the window to maximize in the horizontal or vertical direction.

I do _NOT_ want to disable the "double click to windowshade" behavior when double clicking in the title bar area.

Is this possible?

Offline

#2 2016-07-21 12:32:24

Xen2050
Member
Registered: 2014-02-02
Posts: 4

Re: How to disable edge-of-window/border double click behavior?

I also want to disable the window border double click. xfwm 4.12.3, don't see anything related in the settings (gui or editor), and disabling the "Double click action" in Window Manager -> Advanced doesn't do it.

I didn't even know such a feature was there until my mouse started randomly double-clicking, and the "maximize in a direction" behaviour seems very inconsistent, sometimes it only half-expands a side, sometimes it expands only one side, sometimes it moves the window some and expands one side, sometimes expands both sides... an option to disable is needed, and if it already exists where is it?

Offline

#3 2016-07-21 15:32:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: How to disable edge-of-window/border double click behavior?

It's hard-coded. You'll need to create an enhancement request if you want this to be configurable.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2016-09-14 16:53:27

Rosuav
Member
Registered: 2016-09-14
Posts: 5

Re: How to disable edge-of-window/border double click behavior?

I'd very much like to disable this, too. What's the best way to open an enhancement request?

Offline

#5 2016-09-14 17:39:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: How to disable edge-of-window/border double click behavior?

Create a request at https://bugzilla.xfce.org/ for the xfwm4 product.

Here is a patch that creates a (hidden) "clientfill_on_border_doubleclick" xfconf property that can be set to FALSE (default is TRUE to retain current functionality) that can be applied against the current git tree, I can attach it to the bug report for Oliver (xfwm4 developer) to review:

diff --git a/defaults/defaults b/defaults/defaults
index 2b1ba5b..2930a0a 100644
--- a/defaults/defaults
+++ b/defaults/defaults
@@ -6,6 +6,7 @@ button_layout=O|SHMC
 button_offset=0
 button_spacing=0
 click_to_focus=true
+clientfill_on_border_doubleclick=true
 cycle_apps_only=false
 cycle_draw_frame=true
 cycle_hidden=true
diff --git a/src/events.c b/src/events.c
index e8b6b34..3372aa1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -624,7 +624,7 @@ edgeButton (Client * c, int part, XButtonEvent * ev)
             clientRaise (c, None);
         }
         tclick = typeOfClick (screen_info, c->window, (XEvent *) ev, TRUE);
-        if (tclick == XFWM_BUTTON_DOUBLE_CLICK)
+        if (tclick == XFWM_BUTTON_DOUBLE_CLICK && screen_info->params->clientfill_on_border_doubleclick)
         {
             switch (part)
             {
diff --git a/src/settings.c b/src/settings.c
index ce2f8c0..d1a2f48 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -717,6 +717,7 @@ loadSettings (ScreenInfo *screen_info)
         {"button_offset", NULL, G_TYPE_INT, TRUE},
         {"button_spacing", NULL, G_TYPE_INT, TRUE},
         {"click_to_focus", NULL, G_TYPE_BOOLEAN, TRUE},
+        {"clientfill_on_border_doubleclick", NULL, G_TYPE_BOOLEAN, TRUE},
         {"cycle_apps_only", NULL, G_TYPE_BOOLEAN, TRUE},
         {"cycle_draw_frame", NULL, G_TYPE_BOOLEAN, TRUE},
         {"cycle_hidden", NULL, G_TYPE_BOOLEAN, TRUE},
@@ -810,6 +811,8 @@ loadSettings (ScreenInfo *screen_info)
         getBoolValue ("box_move", rc);
     screen_info->params->click_to_focus =
         getBoolValue ("click_to_focus", rc);
+    screen_info->params->clientfill_on_border_doubleclick =
+        getBoolValue ("clientfill_on_border_doubleclick", rc);
     screen_info->params->cycle_apps_only =
         getBoolValue ("cycle_apps_only", rc);
     screen_info->params->cycle_minimum =
@@ -1281,6 +1284,10 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
                     screen_info->params->click_to_focus = g_value_get_boolean (value);
                     update_grabs (screen_info);
                 }
+                else if (!strcmp (name, "clientfill_on_border_doubleclick"))
+                {
+                    screen_info->params->clientfill_on_border_doubleclick = g_value_get_boolean (value);
+                }
                 else if (!strcmp (name, "focus_new"))
                 {
                     screen_info->params->focus_new = g_value_get_boolean (value);
diff --git a/src/settings.h b/src/settings.h
index b1467b9..a346a73 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -206,6 +206,7 @@ struct _XfwmParams
     gboolean box_move;
     gboolean box_resize;
     gboolean click_to_focus;
+    gboolean clientfill_on_border_doubleclick;
     gboolean cycle_apps_only;
     gboolean cycle_draw_frame;
     gboolean cycle_hidden;

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2016-09-14 17:47:46

Rosuav
Member
Registered: 2016-09-14
Posts: 5

Re: How to disable edge-of-window/border double click behavior?

Offline

#7 2016-09-14 17:58:35

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: How to disable edge-of-window/border double click behavior?

I attached the patch to the report. Lets see what Oliver says.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2016-09-14 18:00:28

Rosuav
Member
Registered: 2016-09-14
Posts: 5

Re: How to disable edge-of-window/border double click behavior?

Thanks! I've never actually recompiled Xfce before - always just taken the one that Debian ships with. Are there any known hazards, risks to be aware of? (I'm comfortable building stuff from git, just never rebuilt my window manager.)

Offline

#9 2016-09-14 19:33:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: How to disable edge-of-window/border double click behavior?

I'm not sure what advice to give in these situations. Even though the patch itself is not complicated, you never know what might happen. If you can test this on a non-critical or VM system, then do that first. Always backup important data on critical systems.

Consider how far away your current version of xfwm4 is from the git tree (the patch might not work or the newer version may not work in that environment). If you're using any sort of stable distro version, then doing this negates the whole "running a stable version" thing.

If you do decide to build it yourself, you'll need to figure out which parameters to pass to the autogen script. The best way to find these is to find out which parameters your distribution currently uses (via build logs). Try it first in a vm or on a non-critical system.

Personally, I've never built any components on a Debian system so I'm not sure what other issues might exist.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2016-09-14 19:56:03

Rosuav
Member
Registered: 2016-09-14
Posts: 5

Re: How to disable edge-of-window/border double click behavior?

I'm not the OP, and I run a network with mainly Debian Stable, but my primary personal-use computer is running Debian Testing. So I'm not as far behind as the OP is; most of my systems run Xfce 4.10.1, and my primary is running 4.12.something already, so I don't expect that to be a major issue.

But since this will presumably involve a reboot (or at least a window manager restart), yeah, I'm doing the obvious thing and trying it in a VM. Compiling a window manager from source seemed to involve way too little trouble, so I was worried that I was heading for disaster somewhere - it can't be THIS easy, surely? smile Although that might be because I did that test on Stretch, with 4.12 - repeating the exercise on Jessie with 4.10 came up with complaints. So I'm upgrading the VM to Stretch before messing with xfwm4 from git.

Offline

#11 2016-09-15 08:31:43

Rosuav
Member
Registered: 2016-09-14
Posts: 5

Re: How to disable edge-of-window/border double click behavior?

Well... it works! Only tested in a VM, granted, but it works! If anyone else is trying to figure this out, the command to change the config flag is:

xfconf-query -c xfwm4 -p /general/clientfill_on_border_doubleclick -s false

Thanks ToZ. I'll be deploying this to my primary system next reboot.

Offline

Board footer

Powered by FluxBB