Please don't say XLib does not, when in fact it does, and I have used it
for that purpose. You can use it provides hints to the Window Manager
(hence the WM). Don't just say shit like "does NOT" if you don't know
for sure man. You could say "I'm not sure" or "XLib as far as I know",
etc. I *have* used it for _NET_WM commands. Quite common actually,
INCLUDING _NET_WM_STATE.
- Dennis
On 2015-10-28 07:02 PM, Anthony Walter wrote:
Actually XLib does NOT provide control over layering windows, input
focus, z-order, virtual desktops. It's the window manager (KWin,
Compiz, Metacity, IceWM, and so on) which handles this.
As such, with some tookits and window manager combinations it's not
possible to do certain things without special code to work around
specific combinations of both. For example, when writing a Gtk2
application with Compiz it's not possible to alter the z-order of your
application, ie bringing it to the foreground and/or activating it.
XLib won't help you with this.
But the good news is that most all window managers expose window
management functionality through a common protocol: NetWM
For example the _NET_WM_STATE message can be used to reorder the stack
of application windows above or below one another (bringing your
application to the top). It can be used to make your window sticky (to
appear in the same place in all workspaces).
The _NET_ACTIVE_WINDOW can be used to find application window with
input focus. It can also be used to give input focus to another
application window.
These are all thing which XLib doesn't cover, and areas where Lazarus
and some toolkits/window managers struggle with parity. That is,
without a common protocol like NetWM.
Anyhow, if anyone is still interested, I've written a Free Pascal unit
to interface with the NetWM protocol. So far I've tested it with Gtk2
on Compix with the following functionality:
Show/hide desktop [x] works
Switch workspace [x] works
Sticky/unsticky a window [x] works
Move window to a different workspace [x] works
Cycle various application z-orders [x] works
I will implement a few more functions and then post the unit to
github. I'd like to get application activation, bypassing window
animations, and a few other features working. When posted if people
with different window managers (KDE's KWin) want to test it, that
would be great.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus