From 695bca9033be7741d746cb7eacbf9518c8d66e10 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 16 May 2016 09:40:02 -0400 Subject: [PATCH] Tested the worksWhenModal stuff for NSColorPanel; it works. --- darwin/colorbutton.m | 3 ++- darwin/stddialogs.m | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/darwin/colorbutton.m b/darwin/colorbutton.m index af6d1faa..5c33228f 100644 --- a/darwin/colorbutton.m +++ b/darwin/colorbutton.m @@ -46,7 +46,8 @@ struct uiColorButton { [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; [super activate:YES]; activeColorButton = self; - // TODO try setWorksWhenModal (I'd need a color well there) + // see stddialogs.m for details + [[NSColorPanel sharedColorPanel] setWorksWhenModal:NO]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deactivateOnClose:) name:NSWindowWillCloseNotification diff --git a/darwin/stddialogs.m b/darwin/stddialogs.m index 07f4ab03..f6fdc519 100644 --- a/darwin/stddialogs.m +++ b/darwin/stddialogs.m @@ -3,7 +3,7 @@ // TODO restructure this whole file // TODO explicitly document this works as we want -// TODO explicitly disable color dialogs this way +// TODO note that font and color buttons also do this #define windowWindow(w) ((NSWindow *) uiControlHandle(uiControl(w)))