Skip to content

Port away from Window::clientPos()

Vlad Zahorodnii requested to merge work/zzag/drop-client-pos into master

Window has three client geometry properties: clientGeometry, clientSize and clientPos.

clientGeometry is in the global screen coords. clientSize is an alias for clientGeometry().size(). clientPos() is an alias for clientGeometry().topLeft(). Nope, it isn't!

clientPos() is an alias for top and left frame margins.

In order to make this less messy, this change ports most of usages of clientPos() either to clientGeometry().topLeft() or frameMargins(). X11Window still uses clientPos() because it makes sense there.

I would like to drop Window::clientPos() and keep it in X11Window instead, however it's tricky to do because of scripting. It may be revisited later.

Merge request reports

Loading