mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
Added/fix handling of WM_SETCURSOR so that Windows doesn't override our cursor rectangles and vice-versa. This revision goes in par with Core GUI revision #37189.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@37190 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b64f7fbd78
commit
128d09da60
4 changed files with 32 additions and 11 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-10-03 Frank Le Grand <frank.legrand@testplant.com>
|
||||
|
||||
* Source/win32/WIN32Server.m
|
||||
* Source/win32/WIN32Server.h
|
||||
* Source/win32/win32_general.m: Fixed processing of
|
||||
WM_SETCURSOR: We now mark the event has handled in our
|
||||
NSCursor stack is not empty, indicating that we're in a cursor
|
||||
rectangle and we don't want Windows to set the cursor.
|
||||
|
||||
2013-08-18 Frank Le Grand <frank.legrand@testplant.com>
|
||||
|
||||
* Source/win32/WIN32Server.m : We're now processing the Windows
|
||||
|
|
|
@ -186,6 +186,7 @@ typedef struct w32serverFlags
|
|||
- (void) decodeWM_SYSCOMMANDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
|
||||
- (void) decodeWM_COMMANDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
|
||||
- (void) decodeWM_THEMECHANGEDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
|
||||
- (void) decodeWM_SETCURSORParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -1587,17 +1587,8 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
|
|||
[self decodeWM_KILLFOCUSParams: wParam : lParam : hwnd];
|
||||
break;
|
||||
case WM_SETCURSOR:
|
||||
// This was a fix where our cursor was reset to the default arrow
|
||||
// after the first mouse move after we had set it to something
|
||||
// else according to a view's cursorRects.
|
||||
// Unfortunately this is not enough, as it now makes the default
|
||||
// cursor show when we expect a resizing cursor on a Window's
|
||||
// edges (among other issues).
|
||||
// if (g_cursorId)
|
||||
// {
|
||||
// SetCursor((HCURSOR)g_cursorId);
|
||||
// flags._eventHandled = YES;
|
||||
// }
|
||||
if (wParam == (int)hwnd)
|
||||
[self decodeWM_SETCURSORParams: wParam : lParam : hwnd];
|
||||
break;
|
||||
case WM_QUERYOPEN:
|
||||
[self decodeWM_QUERYOPENParams: wParam : lParam : hwnd];
|
||||
|
|
|
@ -33,6 +33,13 @@
|
|||
#include "win32/WIN32Geometry.h"
|
||||
#include <GNUstepGUI/GSTheme.h>
|
||||
|
||||
@interface NSCursor (NSCursor_w32_General)
|
||||
|
||||
+ (NSMutableArray *) stack;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation WIN32Server (w32_General)
|
||||
|
||||
- (void) decodeWM_CLOSEParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
|
||||
|
@ -141,4 +148,17 @@
|
|||
// Reactivate the theme when the host system changes it's theme...
|
||||
[[GSTheme theme] activate];
|
||||
}
|
||||
|
||||
- (void) decodeWM_SETCURSORParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
|
||||
{
|
||||
// Are we in a cursor rectangle?
|
||||
if ([[NSCursor stack] count] > 0)
|
||||
{
|
||||
// if so, we've already taken care of setting our cursor, otherwise
|
||||
// if we don't mark the event as handled, we'll let Windows handle it,
|
||||
// e.g. to show the resizing cursors around a windows.
|
||||
flags._eventHandled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue