diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-11 17:49:51 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-11 17:49:51 -0700 |
commit | 55d9973b053f25bb95b26e00351dc5531caf5b04 (patch) | |
tree | 84be48d7915de1fc0f4296eebec75da976d1ff70 | |
parent | bc4883e00b12a9289eeb9625862d42b0ea141356 (diff) |
Xquartz: Added applicationShouldHandleReopen:hasVisibleWindows to handle dock icon clicking
-rw-r--r-- | hw/xquartz/X11Controller.m | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 5bf4f4d52..2fd988661 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -743,15 +743,21 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row - (BOOL) application:(NSApplication *)app openFile:(NSString *)filename { - const char *name = [filename UTF8String]; - - if (finished_launching) - [self launch_client:filename]; - else if (name[0] != ':') /* ignore display names */ - pending_apps = x_list_prepend (pending_apps, [filename retain]); - - /* FIXME: report failures. */ - return YES; + const char *name = [filename UTF8String]; + + if (finished_launching) + [self launch_client:filename]; + else if (name[0] != ':') /* ignore display names */ + pending_apps = x_list_prepend (pending_apps, [filename retain]); + + /* FIXME: report failures. */ + return YES; +} + +- (BOOL) applicationShouldHandleReopen:(NSApplication *)app + hasVisibleWindows:(BOOL)hasVis { + DarwinSendDDXEvent(kXquartzBringAllToFront, 0); + return YES; } @end |