Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage my application window with python-xlib?

I would like to find a linux-wide (insofar as it uses X11) way to control the window geometry of my application, which I program using Python. All my researches point to using python-xlib, which happens to be very poorly documented.

What I'd like to achieve is:

  • define position of window on screen
  • define minimum and maximum size
  • enable / disable window resizing
  • reserve screen-space for window
  • keep window above/below
  • skip or not task-bar (aka window list)
  • set window decorated / undecorated
  • set window flags (normal, pop-up, dialogue, splash, dock, ignored)

NB: I don't want to create the with Xlib, instead I want to tell X what to do with the window i created with some GUI library (PyQt for instance).

How can I go about doing this? I realise this question is quite a big one: do you have hints at least as to how I can get hold of my window? Where in the module can I find my answers?

Edit: n.m.'s answer offered great resources, and there is also another Q&A on Unix StackExchange that provides a great example on how to get control on an application window displayed by X.

like image 668
neydroydrec Avatar asked May 30 '11 08:05

neydroydrec


1 Answers

The first keyword you need to know is ICCCM. You need to be familiar with the ICCCM manual (see http://tronche.com/gui/x/icccm/) and the FreeDesktop extensions to the same (see http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html). As for your question

how I can get hold of my window?

I don't quite understand it. You call create_window and the function returns your Window object. Or do you mean something else?

like image 148
n. 1.8e9-where's-my-share m. Avatar answered Oct 26 '22 06:10

n. 1.8e9-where's-my-share m.