#1026389 xfce4: split screen doesn't work anymore

Package:
xfce4
Source:
xfce4
Submitter:
Alejandro Colomar
Date:
2023-01-07 12:36:02 UTC
Severity:
normal
Tags:
#1026389#5
Date:
2022-12-19 12:07:38 UTC
From:
To:
Dear maintainer,

When I upgraded my Sid system yesterday (I do it every week or so),
windows cannot be moved to the edge of the screen to have them use half
screen.  It simply moves there without readjusting.

#1026389#10
Date:
2023-01-05 01:33:17 UTC
From:
To:
this looks like it appeared in unstable with the
appearance of xfwm4 4.18.0-1 at 2022-12-15,
replacing the previous version 4.16.1-1 in unstable.

And looks like it was discussed upstream in this report:
https://gitlab.xfce.org/xfce/xfwm4/-/issues/685

And indeed, when unchecking following in Window Manager
settings it seems to "snap" again:

   Wrap workspaces when reaching the screen edge / With a dragged window

So this looks like expected behaviour from upstream.

Kind regards,
Bernhard

#1026389#15
Date:
2023-01-05 01:45:36 UTC
From:
To:
Hi Bernhard,

Thanks!

I had that one disabled (but I didn't do that; I guess it was like that by
default).  My windows don't move to other workspaces when moving them, and yet
don't "snap".  I just get windows that are half in a workspace, half nowhere.
They don't jump to another workspace nor tile.

Kind regards,

Alex

#1026389#20
Date:
2023-01-05 10:51:45 UTC
From:
To:
I don't know exactly what is meant by snap, so I'll clarify:

If I move a window adjacent to another window or the edge of the screen, it
repositions itself so the the borders are touching (I can adjust the distance at
which that occurs).  That's "Settings manager->Personal->Window
Manager->Advanced->Windows Snapping".

However, windows don't resize automatically to use half screen or quarter
screen.  I can't manage to get that working, which previously worked by default.

#1026389#25
Date:
2023-01-05 23:17:52 UTC
From:
To:

Sorry for not being enough precise.
When I disabled "With a dragged window" and applied the setting a file manager window
dragged to the left border of my VM did get resized to fill half of the screen.

"To screen borders" - default as far as I see is on and was on in all my tests.
"To other windows" - default as far as I remember is off and was off in all my tests.
"With the mouse pointer" - default as far as I see is off and was off in all my tests.
"With a dragged window" - default as far as I see is on.

If you still don't get a dragged window filling half of the screen,
then I can't reproduce your issue and don't have a solution.

Kind regards,
Bernhard

#1026389#30
Date:
2023-01-05 23:21:25 UTC
From:
To:
Hi Bernhard,

I confirm that either with those 4 defaults, or with "with a dragged window" off
(as you suggested that would fix it), I still have it bugged.

Is there any other setting that might be affecting?

Cheers,

Alex

#1026389#35
Date:
2023-01-07 00:53:07 UTC
From:
To:

Hello Alex,
I tried to find out where the magic happens,
and wanted to write it to you.
But I found some strange wiring about the "With a dragged window"
configuration option.

Somehow it is responsible in the configuration file
for "/general/snap_to_windows" and "/general/tile_on_move".
Unfortunately the latter setting can just be changed once,
and that is switching off.

The patch at the bottom would set tile_on_move to true,
if the "With a dragged window" gets switched off.

Kind regards,
Bernhard


(gdb) bt
#0  clientTile (c=0x14d6800, cx=1, cy=224, tile=TILE_LEFT, send_configure=1, restore_position=0) at ./src/client.c:3701
#1  0x004c61c8 in clientMoveTile (event=<optimized out>, c=0x14d6800) at ./src/moveresize.c:862
#2  clientMoveEventFilter (event=0x1323410, data=0xbfab8914) at ./src/moveresize.c:1063
#3  0x004b4ace in eventXfwmFilter (gdk_xevent=0xbfab871c, gevent=0x149a400, data=0x1468d30) at ./src/event_filter.c:175
#4  0xb73693b1 in  () at /lib/i386-linux-gnu/libgdk-3.so.0
...


$ grep -E "To screen.*borders|To other.*windows|With the mouse.*pointer|With a.*dragged window" . -Rn -B1 --exclude *.po
...
./settings-dialogs/xfwm4-dialog.glade-1315-                                  <object class="GtkCheckButton" id="wrap_windows_check">
./settings-dialogs/xfwm4-dialog.glade:1316:                                    <property name="label" translatable="yes">With a _dragged window</property>


$ grep -E "snap_to_border_check|snap_to_window_check|wrap_workspaces_check|wrap_windows_check" . -Rn -B1
...
./settings-dialogs/xfwm4-settings.c-611-  xfconf_g_property_bind (settings->priv->wm_channel, "/general/wrap_windows", G_TYPE_BOOLEAN,
./settings-dialogs/xfwm4-settings.c:612:                          wrap_windows_check, "active");
...
./settings-dialogs/xfwm4-settings.c:617:  g_signal_connect (G_OBJECT (wrap_windows_check), "toggled",
./settings-dialogs/xfwm4-settings.c-618-                    G_CALLBACK (cb_wrap_windows_toggled),
...
./settings-dialogs/xfwm4-settings.c:1612  cb_wrap_windows_toggled (GtkToggleButton *toggle, XfconfChannel *channel)
./settings-dialogs/xfwm4-settings.c:1613  {
./settings-dialogs/xfwm4-settings.c:1614    if (gtk_toggle_button_get_active (toggle))
./settings-dialogs/xfwm4-settings.c:1615      xfconf_channel_set_bool (channel, "/general/tile_on_move", FALSE);
./settings-dialogs/xfwm4-settings.c:1616  }


$ grep -E "wrap_workspaces|wrap_windows|snap_to_border|snap_to_windows|tile_on_move" -Rn --include *.xml
...
.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml:63:    <property name="tile_on_move" type="bool" value="true"/>
.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml:80:    <property name="wrap_windows" type="bool" value="false"/>
--- xfwm4-4.18.0.orig/settings-dialogs/xfwm4-settings.c +++ xfwm4-4.18.0/settings-dialogs/xfwm4-settings.c @@ -1613,6 +1613,8 @@ cb_wrap_windows_toggled (GtkToggleButton { if (gtk_toggle_button_get_active (toggle)) xfconf_channel_set_bool (channel, "/general/tile_on_move", FALSE); + else + xfconf_channel_set_bool (channel, "/general/tile_on_move", TRUE); }
#1026389#40
Date:
2023-01-07 11:00:01 UTC
From:
To:

Now after some sleep I found that this might really be the
way upstream wants this to handle, so the patch is wrong.

After enabling "With a dragged window" in xfwm4-settings
which switches off the tile_on_move setting,
the user can re-enable this setting by
"Automatically tile windows when moving towards the screen edge"
in xfwm4-tweaks-settings.
(If both settings applications are opened side by side,
one can watch how enabling the first disables the second.)

Unfortunately not the most intuitive process.

Kind regards,
Bernhard

#1026389#45
Date:
2023-01-07 11:53:40 UTC
From:
To:
Hi Bernhard!

Thanks a lot!  This worked (and yes, unintuitive as hell).

Cheers,

Alex

#1026389#50
Date:
2023-01-07 12:33:23 UTC
From:
To:


Dear Maintainer,
in an unmodified default xfwm4 config both "tile_on_move"
and "wrap_windows" are true, and seems not to cause issues.

But therefore when activating "With a dragged window" the deactivation
of "tile_on_move" in cb_wrap_windows_toggled seems superfluous?

Removing cb_wrap_windows_toggled would probably be more intuitive,
as both options are in different configuration applications.

Kind regards,
Bernhard


.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
     <property name="tile_on_move" type="bool" value="true"/>
     <property name="wrap_windows" type="bool" value="true"/>