View Full Version : Quartz-wm & menubar
09-25-2003, 08:26 AM
I want to be able to create windows without decorations that can be moved under the menu bar, yet still be added to the dock when iconified and z-ordered correctly. If I set the XWindowAttributes.override_redirect = True, I get the 'no decorations' and am able to move the window under the menu bar, but my windows can no longer be docked and are not z-ordered correctly with other X apps. If I set override_redirect = False and use the _MOTIF_WM_HINTS atom with MotifWmHints.flags = (1 << 1) and MotifWmHints.decorations = 0 and call XChangeProperty, I can remove the decorations, but I still need to know the "backdoor" for being allowed to move a window behind the menubar without loosing docking and z-order.
jean claude wrote:
...but I still need to know the "backdoor" for being allowed to move a window behind the menubar without loosing docking and z-order
Jean Claude, from what I know, in rootless mode -XDarwin looks like any other application to CoreGraphics. The CoreGraphics window server is what they call Quartz Compositor. There is a one-to-one mapping between top level X windows and CoreGraphics windows.
There are several ways to talk to the window server. They are all written on top of an Apple internal CGS API. XDarwin uses some combination of the following:
Cocoa (AppKit) (http://developer.apple.com/documentation/Cocoa/Cocoa.html)
Carbon (QuickDraw) (http://developer.apple.com/documentation/Carbon/Reference/QuickDraw_Manager/index.html) - This is a legacy API from classic Mac OS.
Xplugin - This is the API which provides lower level access to the CoreGraphics window server. Check the documentation at the header file in xc/programs/Xserver/hw/darwin/quartz/xpr/Xplugin.h.
Mac OS X has a lot of API's to do the same thing because of its mixed heritage. For example, Cocoa exposes its event handling through the NSApplication, NSRunLoop and NSEvent classes while Carbon uses the Carbon Event Manager.
For Carbon, check the Dock Manager Reference (http://developer.apple.com/documentation/Carbon/Reference/Dock_Manager/dockmngr_ref.pdf.)
Hope it helps...
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.