Start with a normalized window, then maximize horizontally, e.g.:
wmctrl -i -r '<window ID>' -b add,maximized_horz
This works. Then issue the maximized_vert command:
wmctrl -i -r '<window ID>' -b add,maximized_vert
Nothing happens. If you start off with a successful vertical maximization command, then the horizontal one fails (but of course doesn't tell wmctrl...).
It looks like the code is hardcoded to treat either MAXIMIZED_HORZ or MAXIMIZED_VERT as 'maximized' (client.h:157):
#define CLIENT_FLAG_MAXIMIZED (CLIENT_FLAG_MAXIMIZED_VERT | \
so when the command to add the maximized state is processed in netwm.c:clientUpdateNetState, line 381, the code ignores valid maximization commands in the axis that hasn't been maximized:
if ((action == NET_WM_STATE_ADD) && !FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
mode = 0L;
if ((first == display_info->atoms[NET_WM_STATE_MAXIMIZED_HORZ]) ||
(second == display_info->atoms[NET_WM_STATE_MAXIMIZED_HORZ]))
mode |= !FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ) ? CLIENT_FLAG_MAXIMIZED_HORIZ : 0;
is there a reason maximization in one axis only isn't being considered? Feels deliberate.
As this has been ignored, I have looked into fixing it - turns out there is already a proper test that can be applied here - FLAG_TEST should be swapped with FLAG_TEST_ALL, since a window is only truly maximized when both axes are maximized:
if ((action == NET_WM_STATE_ADD) && !FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED))
This way just being maximized in one axis doesn't prevent the other from being applied.
-- GitLab Migration Automatic Message --
This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfwm4/-/issues/215.
Please create an account or use an existing account on one of our supported OAuth providers.
If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests
Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev