diff --git a/ChangeLog b/ChangeLog index 9c07974..d5f4425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-08 Wolfgang Lux + + * Source/x11/XGServerWindow.m (-titlewindow::, -docedited::): Add + an asterisk before the window's title if its document is edited + and the window manager is not capable of displaying the document's + status (i.e., any window manager other than Window Maker for now). + 2009-02-08 Matt Rice * Source/x11/XGGLContext.m (-[XGXSubWindow initWithView:visualInfo:]): diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 1c5c23d..fd2cf6c 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -2448,6 +2448,13 @@ NSLog(@"styleoffsets ... guessing offsets\n"); const char *title; int error = XLocaleNotSupported; + if (handlesWindowDecorations && (generic.wm & XGWM_WINDOWMAKER) == 0 && + (window->win_attrs.flags & GSExtraFlagsAttr) && + (window->win_attrs.extra_flags & GSDocumentEditedFlag)) + { + window_title = [@"*" stringByAppendingString: window_title]; + } + #ifdef X_HAVE_UTF8_STRING title = [window_title UTF8String]; error = Xutf8TextListToTextProperty(dpy, (char **)&title, 1, @@ -2510,6 +2517,16 @@ NSLog(@"styleoffsets ... guessing offsets\n"); generic.win_decor_atom, generic.win_decor_atom, 32, PropModeReplace, (unsigned char *)&window->win_attrs, sizeof(GNUstepWMAttributes)/sizeof(CARD32)); + + /* + * Reflect the document's edited status in the window's title when the + * backend does not manage the window decorations + */ + if (handlesWindowDecorations && (generic.wm & XGWM_WINDOWMAKER) == 0) + { + NSWindow *nswin = GSWindowWithNumber(win); + [self titlewindow: [nswin title] : win]; + } } - (BOOL) appOwnsMiniwindow