generate the window leave event only for WM_INACTIVE

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2010-01-10 18:34:30 +00:00
parent f126c3ced8
commit a520fd608c

View file

@ -39,7 +39,21 @@
switch (last_WM_ACTIVATE)
{
case WA_ACTIVE: //deactivate
case WA_ACTIVE:
{
/* we become the inactivation event on WM_INACTIVE */
/* Sending another leave event might confuse the front event */
currentActive = hwnd;
}
break;
case WA_CLICKACTIVE:
{
/* we become the inactivation event on WM_INACTIVE */
/* Sending another leave event might confuse the front event */
currentActive = hwnd;
}
break;
case WA_INACTIVE:
{
NSEvent *ev;
@ -47,36 +61,13 @@
location: NSMakePoint(0, 0)
modifierFlags: 0
timestamp: 0
windowNumber: (int)lParam
windowNumber: (int)hwnd
context: GSCurrentContext()
subtype: GSAppKitWindowLeave
data1: 0
data2: 0];
[EVENT_WINDOW(lParam) sendEvent: ev];
}
break;
case WA_CLICKACTIVE: //order back the window
{
NSEvent *ev;
ev = [NSEvent otherEventWithType: NSAppKitDefined
location: NSMakePoint(0, 0)
modifierFlags: 0
timestamp: 0
windowNumber: (int)lParam
context: GSCurrentContext()
subtype: GSAppKitWindowLeave
data1: 0
data2: 0];
[EVENT_WINDOW(lParam) sendEvent: ev];
}
break;
case WA_INACTIVE: // set currentactive and display
{
currentActive = hwnd;
[EVENT_WINDOW(lParam) display];
[EVENT_WINDOW(hwnd) sendEvent: ev];
}
break;