Use arrow cursor in transient menus.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36875 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Germán Arias 2013-07-12 05:03:34 +00:00
parent 32299abf5b
commit 405b577cd1
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-07-11 German A. Arias <german@xelalug.org>
* Source/NSMenu.m (-displayTransient): Push an arrow cursor when
display transient menus, to not use the current cursor.
2013-07-08 Fred Kiefer <FredKiefer@gmx.de>
* Headers/Additions/GNUstepGUI/GSDisplayServer.h

View file

@ -49,6 +49,7 @@
#import "AppKit/NSMatrix.h"
#import "AppKit/NSApplication.h"
#import "AppKit/NSCursor.h"
#import "AppKit/NSWindow.h"
#import "AppKit/NSEvent.h"
#import "AppKit/NSFont.h"
@ -1911,8 +1912,17 @@ static BOOL menuBarVisible = YES;
[contentView addSubview: _view];
[_view update];
[_bWindow orderFront: self];
/* Right mouse buttons which display transient menus don't update
* the cursor. So, the current cursor is displayed over the
* contextual menu (for example an I beam). However, when menu is
* closed the cursor pop, this can set a wrong cursor. We push here
* an arrow cursor, the cursor we want at menus. Being sure that
* this will pop when menu closes.
*/
[[NSCursor arrowCursor] push];
}
- (void) close