The attached patch solves the problem for me (tested on WindowMaker and
Gnome 3). The problem seems to be the event queue. Not sure if this
change is OK or not.

Germán


El mié, 18-01-2017 a las 14:22 +0100, Riccardo Mottola escribió:
> Hi,
> 
> Fred Kiefer wrote:
> > I just committed a tiny change to the window level handling that
> > hopefully helps tool tips on other window managers. But I am not
> > very
> > convinced that you actually have a window type issue here, from
> > your
> > description it sounds more like a timing issue.
> 
> I did some more accurate testing on NetBSD/amd64.
> I noticed by testing on PC's buttons. In my previous mail I said it 
> consistently not worked, now it works sometimes, sometimes not.
> 
> 1) if it does work, it works perfectly
> 2) if it does not display, the icon disappears and becomes grey, yet 
> waiting... a couple of seoncs, sometimes more, will make eventually
> the 
> tooltip appear and also the icon.
> 
> I wonder why the icon is involved at all.
> 
> Riccardo
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Index: Source/x11/XGServerEvent.m
===================================================================
--- Source/x11/XGServerEvent.m	(revisión: 40295)
+++ Source/x11/XGServerEvent.m	(copia de trabajo)
@@ -1074,11 +1074,12 @@
               {
                 NSRect rect;
                 NSTimeInterval ts = (NSTimeInterval)generic.lastMotion;
+		NSEvent *r;
                 
                 rect = [self _XWinRectToOSWinRect: NSMakeRect(
                         rectangle.x, rectangle.y, rectangle.width, rectangle.height)
                              for: cWin];
-                e = [NSEvent otherEventWithType: NSAppKitDefined
+                r = [NSEvent otherEventWithType: NSAppKitDefined
                              location: rect.origin
                              modifierFlags: eventFlags
                              timestamp: ts / 1000.0
@@ -1087,6 +1088,11 @@
                              subtype: GSAppKitRegionExposed
                              data1: rect.size.width
                              data2: rect.size.height];
+
+		/* We don't add this event in event_queue, to don't delay
+		 * its sent.
+		 */
+		[[NSApp windowWithWindowNumber: cWin->number] sendEvent: r];
               }
               
 #endif
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to