Allow wm to control miniwindow

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13291 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-04-02 03:43:41 +00:00
parent 238dbb850c
commit 8818a4dab6
3 changed files with 19 additions and 8 deletions

View file

@ -1,5 +1,10 @@
2002-04-01 Adam Fedor <fedor@gnu.org>
* Source/x11/XGServerWindow.m ([XGServer -_setupRootWindow]): Read
GSAppOwnsMiniwindow default.
([XGServer -appOwnsMiniwindow]): Use it.
([XGServer -miniwindow:): Idem.
* Source/gsc/GSContext.m (-GSSendBezierPath:): Implement
(-GSRectClipList::): Likewise.
(-GSRectFillList::): Likewise.

View file

@ -53,7 +53,7 @@ struct XGGeneric {
int wm;
struct {
unsigned useWindowMakerIcons:1;
unsigned borderedBorderless:1;
unsigned appOwnsMiniwindow:1;
unsigned doubleParentWindow:1;
} flags;
Time lastTime;

View file

@ -706,6 +706,12 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
generic.flags.useWindowMakerIcons = NO;
}
}
generic.flags.appOwnsMiniwindow = YES;
if ([defs stringForKey: @"GSAppOwnsMiniwindow"] != nil
&& [defs boolForKey: @"GSAppOwnsMiniwindow"] == NO)
{
generic.flags.appOwnsMiniwindow = NO;
}
generic.flags.doubleParentWindow = NO;
if ([defs stringForKey: @"GSDoubleParentWindows"] != nil
&& [defs boolForKey: @"GSDoubleParentWindows"] == YES)
@ -1240,6 +1246,11 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
}
}
- (BOOL) appOwnsMiniwindow
{
return generic.flags.appOwnsMiniwindow;
}
- (void) miniwindow: (int) win
{
gswindow_device_t *window;
@ -1250,16 +1261,12 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
return;
}
NSDebugLLog(@"XGTrace", @"DPSminiwindow: %d ", win);
// AT PRESENT - things seem to go wrong if we set an icon winiwindow -
// I think that the WindowManager prevents us getting most of the events
// in the miniwindow - so it doesn't know when it have been unmapped
// and we end up trying to perform draw operations on an unmapped window!
#if 1
/*
* If we haven't already done so - set the icon window hint for this
* window so that the GNUstep miniwindow is displayed (if supported).
*/
if ((window->gen_hints.flags & IconWindowHint) == 0)
if (generic.flags.appOwnsMiniwindow
&& (window->gen_hints.flags & IconWindowHint) == 0)
{
NSWindow *nswin;
@ -1277,7 +1284,6 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
}
}
}
#endif
XIconifyWindow(XDPY, window->ident, XSCR);
}