[Lazarus] window classes according to WM
dle3ab at angelbase.com
Wed Sep 14 06:22:00 CEST 2011
Thanks so much, Andrew. I couldn't possibly wish for a more concise and complete
explanation; wish my own research had been as fruitful!
Thanks to you, too, Martin.
On Mon 12 Sep 2011, Andrew Haines wrote:
> On 09/12/11 21:59, David Emerson wrote:
> > Hi all,
> > What is the property that determines the window class, as seen by the WM /
> > I'm asking for the purpose of grouping: I'd like to be able to have distinct
> > groups of windows that the WM will group independently of one another.
> > As an example, looking at the easter/holydays example, if I use KDE3's edit
> > window-specific settings dialog I can detect window properties. It shows me
> > Class: Holyday (holyday Holyday)
> > and some other stuff. My assumption is that the class is used by the WM to
> > determine which windows are grouped together.
> > The real reason I'm asking is that in fpgui, the class is undefined and I'd
> > to find out how it's done in lazarus, where it IS defined.
> > Cheers,
> > David.
> Lazarus uses other toolkits in linux (gtk, qt) which set these hints
> already. So no special steps are done with lazarus to set the windows
> class. The toolkit does it for us.
> You can set the class on a window using the Xlib function XAllocClassHint
> Here's the manual page for this function
> see especially
> The first param is the program name and the second is the class name you
> Lastly here's a c example of it's use
> You have to set the class just after the XWindow is created and before
> it is shown.
> PS I found all this searching google for: x11 window class grouping
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
More information about the Lazarus