This is a patch which will always send out _GNUSTEP_WM_ATTR attributes to window manager.
There are three GNUstep-specific attributes: _GNUSTEP_WM_ATTR, _GNUSTEP_WM_MINIATURIZE_WINDOW, _GNUSTEP_TITLEBAR_STATE.
_GNUSTEP_WM_ATTR is for window decoration and window level, and currently, it is send out only for WindowMaker.
Since it is private attributes, not in ICCCM and EWMH, It is safe to always send it out. Most of the window manager will simple ignore/unaware of this attribute. (I test it in WindowMaker and hackedbox).
Another reason that this attribute has to be send out
is that EWMH, which define window level, doesn't fit GNUstep window level very well.
In other word, window manager knowing EWMH will support GNUstep window level fine,
but window manager knowing _GNUSTEP_WM_ATTR can support GNUstep window level perfectly.
Yen-Ju
_________________________________________________________________
Never get a busy signal because you are always connected with high-speed Internet access. Click here to comparison-shop providers. https://broadband.msn.com
*** XGServerWindow.m.orig Mon Oct 27 10:00:59 2003 --- XGServerWindow.m Mon Oct 27 10:17:17 2003 *************** *** 832,851 **** XSetWMClientMachine(dpy, ROOT, &windowName); XFree(windowName.value);
! if ((generic.wm & XGWM_WINDOWMAKER) != 0)
! {
! GNUstepWMAttributes win_attrs;
!
! /*
! * Tell WindowMaker not to set up an app icon for us - we'll make our own.
! */
! win_attrs.flags = GSExtraFlagsAttr;
! win_attrs.extra_flags = GSNoApplicationIconFlag;
! XChangeProperty(dpy, ROOT,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! }
if ((generic.wm & XGWM_EWMH) != 0)
{
--- 832,851 ----
XSetWMClientMachine(dpy, ROOT, &windowName);
XFree(windowName.value);! // Always send GNUstepWMAttributes
! {
! GNUstepWMAttributes win_attrs;
!
! /*
! * Tell WindowMaker not to set up an app icon for us - we'll make our own.
! */
! win_attrs.flags = GSExtraFlagsAttr;
! win_attrs.extra_flags = GSNoApplicationIconFlag;
! XChangeProperty(dpy, ROOT,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! }
if ((generic.wm & XGWM_EWMH) != 0)
{
***************
*** 1019,1033 ****
window->siz_hints.height = NSHeight(frame);
window->siz_hints.flags = USPosition|PPosition|USSize|PSize;! // send to the WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) != 0)
! {
! XChangeProperty(dpy, window->ident, generic.win_decor_atom,
generic.win_decor_atom, 32, PropModeReplace,
(unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! }
! else
{
setWindowHintsForStyle (dpy, window->ident, style);
}
--- 1019,1032 ----
window->siz_hints.height = NSHeight(frame);
window->siz_hints.flags = USPosition|PPosition|USSize|PSize;! // Always send GNUstepWMAttributes
! XChangeProperty(dpy, window->ident, generic.win_decor_atom,
generic.win_decor_atom, 32, PropModeReplace,
(unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
!
! // send to the WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) == 0)
{
setWindowHintsForStyle (dpy, window->ident, style);
}
***************
*** 1234,1247 ****
window->siz_hints.height = NSHeight(h); // send to the WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) != 0)
! {
! XChangeProperty(dpy, window->ident, generic.win_decor_atom,
generic.win_decor_atom, 32, PropModeReplace,
(unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! }
! else
{
setWindowHintsForStyle (dpy, window->ident, style);
}
--- 1233,1245 ----
window->siz_hints.height = NSHeight(h); // send to the WM window style hints
! XChangeProperty(dpy, window->ident, generic.win_decor_atom,
generic.win_decor_atom, 32, PropModeReplace,
(unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
!
! // send to the WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) == 0)
{
setWindowHintsForStyle (dpy, window->ident, style);
}
***************
*** 1331,1344 ****
{
window->win_attrs.extra_flags &= ~GSDocumentEditedFlag;
}
// send WindowMaker WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) != 0)
! {
! XChangeProperty(dpy, window->ident,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
- }
} - (BOOL) appOwnsMiniwindow
--- 1329,1341 ----
{
window->win_attrs.extra_flags &= ~GSDocumentEditedFlag;
}
+
// send WindowMaker WM window style hints
! // Always send GNUstepWMAttributes
! XChangeProperty(dpy, window->ident,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
} - (BOOL) appOwnsMiniwindow
***************
*** 1915,1949 ****
window->win_attrs.window_level = level; // send WindowMaker WM window style hints
! if ((generic.wm & XGWM_WINDOWMAKER) != 0)
! {
! XEvent event;
!
! /*
! * First change the window properties so that, if the window
! * is not mapped, we have stored the required info for when
! * the WM maps it.
! */
! XChangeProperty(dpy, window->ident,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! /*
! * Now send a message for rapid handling.
! */
! event.xclient.type = ClientMessage;
! event.xclient.message_type = generic.win_decor_atom;
! event.xclient.format = 32;
! event.xclient.display = dpy;
! event.xclient.window = window->ident;
! event.xclient.data.l[0] = GSWindowLevelAttr;
! event.xclient.data.l[1] = window->win_attrs.window_level;
! event.xclient.data.l[2] = 0;
! event.xclient.data.l[3] = 0;
! XSendEvent(dpy, DefaultRootWindow(dpy), False,
SubstructureRedirectMask, &event);
! }
! else if ((generic.wm & XGWM_EWMH) != 0)
{
int len;
long data[2];
--- 1912,1947 ----
window->win_attrs.window_level = level; // send WindowMaker WM window style hints
! // Always send GNUstepWMAttributes
! {
! XEvent event;
!
! /*
! * First change the window properties so that, if the window
! * is not mapped, we have stored the required info for when
! * the WM maps it.
! */
! XChangeProperty(dpy, window->ident,
generic.win_decor_atom, generic.win_decor_atom,
32, PropModeReplace, (unsigned char *)&window->win_attrs,
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
! /*
! * Now send a message for rapid handling.
! */
! event.xclient.type = ClientMessage;
! event.xclient.message_type = generic.win_decor_atom;
! event.xclient.format = 32;
! event.xclient.display = dpy;
! event.xclient.window = window->ident;
! event.xclient.data.l[0] = GSWindowLevelAttr;
! event.xclient.data.l[1] = window->win_attrs.window_level;
! event.xclient.data.l[2] = 0;
! event.xclient.data.l[3] = 0;
! XSendEvent(dpy, DefaultRootWindow(dpy), False,
SubstructureRedirectMask, &event);
! }
!
! if ((generic.wm & XGWM_EWMH) != 0)
{
int len;
long data[2];_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep
