Skip to content

Commit c083b7e

Browse files
committed
window-x11.c: Handle a special case for sending a ConfigureNotify
event. Windows tiled to the right or bottom-right corner were getting skipped if their window geometry already matched the tiled size, since with northwest gravity, the client window position wasn't changing either (relative to the frame window). Fixes #705 Fixes #659 Thanks @PCVFaust for help troubleshooting this.
1 parent 9aefdd4 commit c083b7e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/x11/window-x11.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,14 +1436,27 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
14361436
priv->border_width != 0))
14371437
need_configure_notify = TRUE;
14381438

1439-
/* We must send configure notify if we move but don't resize, since
1440-
* the client window may not get a real event
1439+
/* When tiling a window, the frame sizes changes - which edges depend on
1440+
* the tile direction. For every direction but META_TILE_RIGHT and
1441+
* META_TILE_LRC (lower-right-corner), the client position needs to be
1442+
* shifted in at least one direction relative to the frame window, and
1443+
* will need to tell the client window about it.
14411444
*/
14421445
if ((need_move_client || need_move_frame) &&
14431446
!(need_resize_client || need_resize_frame) &&
14441447
window->type != META_WINDOW_TOOLTIP)
14451448
need_configure_notify = TRUE;
14461449

1450+
/* For META_TILE_RIGHT and META_TILE_LRC, the right border and
1451+
* bottom border (for lrc) are removed, but the client size may not
1452+
* change, if it was already the tiled size. The client position
1453+
* won't need to change either, from the frame's upper-left-corner,
1454+
* so the window may not be notified.
1455+
*/
1456+
1457+
if (need_resize_frame && !need_resize_client && window->type != META_WINDOW_TOOLTIP)
1458+
need_configure_notify = TRUE;
1459+
14471460
/* MapRequest events with a PPosition or UPosition hint with a frame
14481461
* are moved by mutter without resizing; send a configure notify
14491462
* in such cases. See #322840. (Note that window->constructing is

0 commit comments

Comments
 (0)