From d9f970a847e1af706f07560ef163b229bb592307 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 1 Jul 2011 14:21:21 +0200 Subject: xwininfo libX11 mesa mkfontscale xserver xkeyboard-config git update 1 Juli 2011 --- xorg-server/hw/xquartz/X11Application.m | 25 ++++++++++++++++--------- xorg-server/hw/xquartz/mach-startup/Makefile.am | 4 +++- 2 files changed, 19 insertions(+), 10 deletions(-) (limited to 'xorg-server/hw/xquartz') diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 31aa9b97f..3973110fe 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -338,18 +338,21 @@ static void message_kit_thread (SEL selector, NSObject *arg) { case NSAppKitDefined: switch ([e subtype]) { + static BOOL x_was_active = NO; + case NSApplicationActivatedEventType: for_x = NO; - if ([self modalWindow] == nil) { + if ([e window] == nil && x_was_active) { BOOL order_all_windows = YES, workspaces, ok; for_appkit = NO; - - /* FIXME: hack to avoid having to pass the event to appkit, - which would cause it to raise one of its windows. */ + + /* FIXME: This is a hack to avoid passing the event to AppKit which + * would result in it raising one of its windows. + */ _appFlags._active = YES; - - [self activateX:YES]; - + + X11ApplicationSetFrontProcess(); + /* Get the Spaces preference for SwitchOnActivate */ (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock")); workspaces = CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), CFSTR("com.apple.dock"), &ok); @@ -370,8 +373,9 @@ static void message_kit_thread (SEL selector, NSObject *arg) { * If there are no active windows, and there are minimized windows, we should * be restoring one of them. */ - if ([e data2] & 0x10) // 0x10 is set when we use cmd-tab or the dock icon + if ([e data2] & 0x10) { // 0x10 (bfCPSOrderAllWindowsForward) is set when we use cmd-tab or the dock icon DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows); + } } break; @@ -381,7 +385,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) { case NSApplicationDeactivatedEventType: for_x = NO; - [self activateX:NO]; + + x_was_active = _x_active; + if(_x_active) + [self activateX:NO]; break; } break; diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.am b/xorg-server/hw/xquartz/mach-startup/Makefile.am index 8e49ea8ac..0b1f8977e 100644 --- a/xorg-server/hw/xquartz/mach-startup/Makefile.am +++ b/xorg-server/hw/xquartz/mach-startup/Makefile.am @@ -22,7 +22,7 @@ X11_bin_LDADD = \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ - $(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) + $(XQUARTZ_LIBS) $(XSERVER_LIBS) X11_bin_LDFLAGS = \ $(XSERVER_SYS_LIBS) -lXplugin \ @@ -52,6 +52,8 @@ X11_bin_LDADD += \ $(top_builddir)/record/librecord.la endif +X11_bin_DEPENDENCIES = $(X11_bin_LDADD) + bin_PROGRAMS = Xquartz dist_Xquartz_SOURCES = \ -- cgit v1.2.3