How to write Window Maker dockapps

93 views
Skip to first unread message

Riza Dindir

unread,
Oct 1, 2023, 9:32:10 AM10/1/23
to Window Maker Development
Hello All,

Is there documentation on how to write dockapps? What must the application satisfy to be a dockapp?

Was considering writing a dockapp using python/tkinter. Would this be a good solution? Is it better to use C/Xlib, or maybe GTK might also be a choice.

Regards
Riza

Christophe

unread,
Oct 1, 2023, 10:34:15 AM10/1/23
to Riza Dindir, Window Maker Development
----- Riza Dindir <riza....@gmail.com> a écrit :
> Hello All,
>
> Is there documentation on how to write dockapps? What must the application
> satisfy to be a dockapp?

I have not found a documentation so far, but the theory is quite simple so I'll explain below.


> Was considering writing a dockapp using python/tkinter. Would this be a
> good solution? Is it better to use C/Xlib, or maybe GTK might also be a
> choice.

Therese is no best choice, if it allows you to do the needed job. If you plan to do a simple dockapp, maybe C/Xlib is better, but from the moment your dockapp needs to open a window you'd prefer to use a toolkit anyway.


*** DockApps, the Theory ***

Basically, a dockapp is an application whose main window is always iconified. Then the goal is to use a window for its icon, and that's where you do the display/interactions.

So, basically:
main_win = XCreateSimpleWindow(...)

the_dockapp_win = XCreateWindow(... parent=main_win ...)
The width=height=48 because that is the standard size, there is no clean official mechanism to ask WMaker the size AFAIK.

You will want to set a "Class" to your window because WMaker will use it to recognize your app:
XSetClassHint(...)

You probably want to use "XSetCommand()" also to let WMaker know how to run the app at startup.

You'll have to use XSetWMHints on the main window:
- to set initial_state = WithdrawnState (That means we don't want the window visible)
- to set icon_window to your the_dockapp_win

The last trick to know, is that you want WMaker's tile visible in the back of your dockapp, so you'll have to use the "XShape" extension for that.

Christophe.

Riza Dindir

unread,
Oct 1, 2023, 10:44:26 AM10/1/23
to Christophe, Window Maker Development
Thank you very much Christophe.

Roman Dobosz

unread,
Oct 2, 2023, 11:54:18 AM10/2/23
to wmake...@googlegroups.com
If you interested in writing some dockap in Python instead, I
revived[1] an old lib, which can help with writing dockapps. An
example[2] of such thing is the one which I wrote at the beginning of
this year and using on daily basis, no issues whatsoever.

[1] https://github.com/gryf/wmdocklib
[2] https://github.com/gryf/pywmtemp

--
-^- _ enjoying the silence
_ /O)_\//
(_(|__(_(_) grf.

Riza Dindir

unread,
Oct 2, 2023, 12:11:22 PM10/2/23
to Window Maker Development, gry...@gmail.com
Thanks for the links. Will be reading the code.

Riza

--
You received this message because you are subscribed to a topic in the Google Groups "Window Maker Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wmaker-dev/Dr12513b3cM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wmaker-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wmaker-dev/20231002175414.14dab51fe9007135cb50965d%40gmail.com.
Reply all
Reply to author
Forward
0 new messages