Fix ICCM ConfigureNotify request
commiteae9200c5dd5f5b63278e874c28d3ca9e891fd1f
authorDavid Maciejak <david.maciejak@gmail.com>
Thu, 16 Mar 2023 11:13:03 +0000 (16 19:13 +0800)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 16 Mar 2023 15:02:18 +0000 (16 15:02 +0000)
tree8d741e2ce72d505048d2498985c5cbbf8829a15a
parent25cb9d208ae8d0493fac8e7cd01bba6e19b881ff
Fix ICCM ConfigureNotify request

According to ICCM specs at [1]

*Not changing the size, location, border width, or stacking order of the window at all.
A client will receive a synthetic ConfigureNotify event that describes the (unchanged)
geometry of the window. The (x,y) coordinates will be in the root coordinate system,
adjusted for the border width the client requested, irrespective of any reparenting
that has taken place. The border_width will be the border width the client requested.
The client will not receive a real ConfigureNotify event because no change has actually
taken place.

*Moving or restacking the window without resizing it or changing its border width.
A client will receive a synthetic ConfigureNotify event following the change that
describes the new geometry of the window. The event's (x,y) coordinates will be in
the root coordinate system adjusted for the border width the client requested.
The border_width will be the border width the client requested. The client may not
receive a real ConfigureNotify event that describes this change because the window
manager may have reparented the top-level window. If the client does receive a
real event, the synthetic event will follow the real one.

*Resizing the window or changing its border width
(regardless of whether the window was also moved or restacked).
A client that has selected for StructureNotify events will receive a real
ConfigureNotify event.
Note that the coordinates in this event are relative to the parent,
which may not be the root if the window has been reparented. The coordinates will
reflect the actual border width of the window (which the window manager may have
changed). The TranslateCoordinates request can be used to convert the coordinates
if required.

In Window Maker, the first case is not implemented: doing a synthetic ConfigureNotify
to notify no changes were done. That's creating some issues with app like Citrix icaclient
when sometime windows are blank and need to be moved to be refreshed.

[1]https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#configuring_the_window
src/window.c