Merge additional code to fix tab drawing

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38659 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-06-20 16:06:26 +00:00
parent 3d60883d2a
commit 060fca2f50
4 changed files with 164 additions and 86 deletions

View file

@ -40,6 +40,7 @@
#import "NSToolbarFrameworkPrivate.h"
#import "GSGuiPrivate.h"
@interface NSWindow (Private)
- (GSWindowDecorationView *) windowView;
- (void) _setMenu: (NSMenu *)menu;
@ -105,17 +106,17 @@
preferredEdge: (NSRectEdge)edge
selectedItem: (int)selectedItem
{
BOOL pe = [[GSTheme theme] doesProcessEventsForPopUpMenu];
/* Ensure the window responds when run in modal and should
* process events. Or revert this if theme has changed.
*/
if ([[GSTheme theme] doesProcessEventsForPopUpMenu] &&
![[mr window] worksWhenModal])
if (pe && ![[mr window] worksWhenModal])
{
[(NSPanel *)[mr window] setWorksWhenModal: YES];
}
if (![[GSTheme theme] doesProcessEventsForPopUpMenu] &&
[[mr window] worksWhenModal])
if (!pe && [[mr window] worksWhenModal])
{
[(NSPanel *)[mr window] setWorksWhenModal: NO];
}