From 0f9aa277c190dc7fce16f8f4ae399ef1e9d4c989 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 6 Mar 2000 22:45:04 +0000 Subject: [PATCH] Support for GNUstep control of window titlebars added. --- src/startup.c | 2 +- src/window.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/startup.c b/src/startup.c index fd827902..b21aeff9 100644 --- a/src/startup.c +++ b/src/startup.c @@ -722,7 +722,7 @@ StartUp(Bool defaultScreenOnly) _XA_WINDOWMAKER_ICON_SIZE = atom[17]; _XA_WINDOWMAKER_ICON_TILE = atom[18]; - _XA_GNUSTEP_TITLEBAR_STATE = atom[99]; + _XA_GNUSTEP_TITLEBAR_STATE = atom[19]; #ifdef OFFIX_DND _XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False); diff --git a/src/window.c b/src/window.c index b18fb940..5a9b9c96 100644 --- a/src/window.c +++ b/src/window.c @@ -1397,7 +1397,8 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner, wwin->prev = NULL; } - wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED); + if (wwin->flags.is_gnustep == 0) + wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED); /* if (wPreferences.auto_focus)*/ wSetFocusTo(scr, wwin); @@ -1583,7 +1584,8 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed) if (wasFocused) { if (newFocusedWindow != owner && owner) { - wFrameWindowChangeState(owner->frame, WS_UNFOCUSED); + if (wwin->flags.is_gnustep == 0) + wFrameWindowChangeState(owner->frame, WS_UNFOCUSED); } wSetFocusTo(scr, newFocusedWindow); } @@ -1638,7 +1640,8 @@ wWindowFocus(WWindow *wwin, WWindow *owin) wwin->flags.semi_focused = 0; - wFrameWindowChangeState(wwin->frame, WS_FOCUSED); + if (wwin->flags.is_gnustep == 0) + wFrameWindowChangeState(wwin->frame, WS_FOCUSED); wwin->flags.focused = 1; @@ -1693,7 +1696,8 @@ wWindowUnfocus(WWindow *wwin) { CloseWindowMenu(wwin->screen_ptr); - wFrameWindowChangeState(wwin->frame, wwin->flags.semi_focused + if (wwin->flags.is_gnustep == 0) + wFrameWindowChangeState(wwin->frame, wwin->flags.semi_focused ? WS_PFOCUSED : WS_UNFOCUSED); if (wwin->transient_for!=None -- 2.11.4.GIT