mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 01:40:38 +00:00
Extended NSCursor to handle missing standard cursor.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20428 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
36aaff3b9d
commit
843814c42c
6 changed files with 28 additions and 2 deletions
|
@ -177,11 +177,22 @@ NSCursor *getStandardCursor(NSString *name, int style)
|
|||
|
||||
if (cursor == nil)
|
||||
{
|
||||
void *c;
|
||||
void *c = NULL;
|
||||
|
||||
cursor = [[NSCursor_class alloc] initWithImage: nil];
|
||||
[GSCurrentServer() standardcursor: style : &c];
|
||||
[cursor _setCid: c];
|
||||
if (c == NULL)
|
||||
{
|
||||
/*
|
||||
There is no standard cursor with this name defined in the
|
||||
backend, so try an image with this name.
|
||||
*/
|
||||
[cursor setImage: [NSImage imageNamed: name]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[cursor _setCid: c];
|
||||
}
|
||||
[cursorDict setObject: cursor forKey: name];
|
||||
RELEASE(cursor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue