summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-11 17:47:41 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-11 17:47:41 -0700
commit5e432c07e65f6d19ba92ed34ffb0f816cb68f7a6 (patch)
tree1dab5c401b9a642181e94f3240ce5bb9bd2615a7
parentd75794f37f7006b93b20c6cc2742e0800cc957ab (diff)
Xquartz: Added applicationShouldHandleReopen:hasVisibleWindows to handle dock icon clicking
-rw-r--r--hw/xquartz/X11Controller.m24
1 files changed, 15 insertions, 9 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index aa9fa94be..63853b55e 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 {
+ QuartzMessageServerThread (kXquartzBringAllToFront, 0);
+ return YES;
}
@end