mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 04:11:28 +00:00
Don't delay sending events GSAppKitWindowMoved and GSAppKitWindowResized.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36765 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c1cd79d4af
commit
7f87663bd3
2 changed files with 28 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2013-06-27 German A. Arias <german@xelalug.org>
|
||||||
|
|
||||||
|
* Source/x11/XGServerEvent.m (-processEvent:): Don't add events
|
||||||
|
WindowResized and WindowMoved in event_queue, to don't delay its
|
||||||
|
sent. Instead, send these directly to the window. If not, the
|
||||||
|
programa can move/resize the window while we send these events,
|
||||||
|
causing a confusion.
|
||||||
|
|
||||||
2013-06-25 Ivan Vucica <ivan@vucica.net>
|
2013-06-25 Ivan Vucica <ivan@vucica.net>
|
||||||
|
|
||||||
* Source/opal/OpalFontInfo.m:
|
* Source/opal/OpalFontInfo.m:
|
||||||
|
|
|
@ -890,10 +890,12 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
||||||
*/
|
*/
|
||||||
if (!NSEqualSizes(r.size, x.size))
|
if (!NSEqualSizes(r.size, x.size))
|
||||||
{
|
{
|
||||||
|
NSEvent *r;
|
||||||
|
|
||||||
/* Resize events move the origin. There's no good
|
/* Resize events move the origin. There's no good
|
||||||
place to pass this info back, so we put it in
|
place to pass this info back, so we put it in
|
||||||
the event location field */
|
the event location field */
|
||||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
r = [NSEvent otherEventWithType: NSAppKitDefined
|
||||||
location: n.origin
|
location: n.origin
|
||||||
modifierFlags: eventFlags
|
modifierFlags: eventFlags
|
||||||
timestamp: ts / 1000.0
|
timestamp: ts / 1000.0
|
||||||
|
@ -902,14 +904,19 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
||||||
subtype: GSAppKitWindowResized
|
subtype: GSAppKitWindowResized
|
||||||
data1: n.size.width
|
data1: n.size.width
|
||||||
data2: n.size.height];
|
data2: n.size.height];
|
||||||
|
|
||||||
|
/* We don't add this event in event_queue, to don't delay
|
||||||
|
* its sent. Instead, send it directly to the window. If not,
|
||||||
|
* the programa can move/resize the window while we send
|
||||||
|
* this event, causing a confusion.
|
||||||
|
*/
|
||||||
|
[[NSApp windowWithWindowNumber: cWin->number] sendEvent: r];
|
||||||
}
|
}
|
||||||
if (!NSEqualPoints(r.origin, x.origin))
|
if (!NSEqualPoints(r.origin, x.origin))
|
||||||
{
|
{
|
||||||
if (e != nil)
|
NSEvent *r;
|
||||||
{
|
|
||||||
[event_queue addObject: e];
|
r = [NSEvent otherEventWithType: NSAppKitDefined
|
||||||
}
|
|
||||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
|
||||||
location: eventLocation
|
location: eventLocation
|
||||||
modifierFlags: eventFlags
|
modifierFlags: eventFlags
|
||||||
timestamp: ts / 1000.0
|
timestamp: ts / 1000.0
|
||||||
|
@ -918,6 +925,13 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
||||||
subtype: GSAppKitWindowMoved
|
subtype: GSAppKitWindowMoved
|
||||||
data1: n.origin.x
|
data1: n.origin.x
|
||||||
data2: n.origin.y];
|
data2: n.origin.y];
|
||||||
|
|
||||||
|
/* We don't add this event in event_queue, to don't delay
|
||||||
|
* its sent. Instead, send it directly to the window. If not,
|
||||||
|
* the programa can move/resize the window while we send
|
||||||
|
* this event, causing a confusion.
|
||||||
|
*/
|
||||||
|
[[NSApp windowWithWindowNumber: cWin->number] sendEvent: r];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue