xfwm: simplify clientConfigure machinery

Enrico Weigelt, metux IT consult lkml at metux.net
Wed Nov 9 15:51:13 CET 2022


Hello folks,


the whole clientConfigure() is quite complicated and hard to understand,
eg. retrieving window parameters, updating internal state and writing
new parameter to the Xserver is intermixed in pretty complex ways.

I've been digging deeply into that and simplifid in many places
(not completely done yet).

The final goal is having a clean separation between various stages of
window manipulation:

1. retrieval from X and updating internal state
  a) (startup) read out existing state
  b) (runtime) intercept configure request
  c) (runtime) wmhint updates

2. WM actions (eg. move/resize)

3. write back to Xserver

Consequently, configureWindow() then will only write through our
internal state to the Xserver (what's now clientReconfigure()) -
all other steps, that are changing internal state, have to be done
before calling it.

This isn't entirely trivial, since lots of little pieces of data are
currently passed through the whole call chain in various ways
(eg. XWindowChanges + different masks) and are processed in different
places.

My current status: all internal call sources (eg move/resize) are now
migrated to configureReconfigure(), thus don't need to pass any extra
(XWindowChanges, ...) anymore. The harder nuts yet to crack are the
two application initiated cases: wmhint and intercepted configure
request. But I'm sure to get it done soon.

My current WIP branch is here:


	https://gitlab.xfce.org/metux/xfwm4/-/commits/wip/reconfigure

I've already splitted out disjunct patches (that can stand for
themselves) as separate MRs.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287


More information about the Xfce4-dev mailing list