mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +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>
|
||||
|
||||
* Source/opal/OpalFontInfo.m:
|
||||
|
|
|
@ -890,10 +890,12 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
*/
|
||||
if (!NSEqualSizes(r.size, x.size))
|
||||
{
|
||||
NSEvent *r;
|
||||
|
||||
/* Resize events move the origin. There's no good
|
||||
place to pass this info back, so we put it in
|
||||
the event location field */
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
r = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: n.origin
|
||||
modifierFlags: eventFlags
|
||||
timestamp: ts / 1000.0
|
||||
|
@ -902,14 +904,19 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
subtype: GSAppKitWindowResized
|
||||
data1: n.size.width
|
||||
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 (e != nil)
|
||||
{
|
||||
[event_queue addObject: e];
|
||||
}
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
NSEvent *r;
|
||||
|
||||
r = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: eventLocation
|
||||
modifierFlags: eventFlags
|
||||
timestamp: ts / 1000.0
|
||||
|
@ -918,6 +925,13 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
subtype: GSAppKitWindowMoved
|
||||
data1: n.origin.x
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue