سؤال

In case I want to have an undecorated window (for example, I may paint the decorations myself), is there a way to tell the current X11 window manager that a region of window should be draggable and managed by the window manager? I'm interested in low-level solutions (Xlib, XCB or similar). I'm also looking for as standard solution as possible.

In addition, can I mark an area of window as representing the close button?

I'm asking about this because it'd be great if I could attach additional content on window's decoration. This is inspired by Apple's OS X, where all decorations are plain old NSViews and some (close buttons, etc) can even be accessed in a documented way. Adding additional content is also inspired by OS X, where one can right click on the name of the document associated with the window (on the title bar) and get the path to the document. At the same time, window remains movable even if the application is unresponsive, so the draggable area must have somehow been communicated to the window manager (that is, the WindowServer, right?).

So, if there is a standard way (or a widespread FreeDesktop.org extension, or something else) to do this under X11, I'd love to know about it. :-)

هل كانت مفيدة؟

المحلول

No way whatsoever.

X11 doesn't even knows what a window manager is. ICCCM and Freedesktop standards are not much different. They know about window managers but do not mandate any particular way of closing and dragging windows, or indeed the very ability to do such things. So there are no official notions of close buttons or drag corners or title bars, and no API for custom definition of such things.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top