----- 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.