GNOME Bugzilla – Bug 663396
With multiple master devices, right clicking may show popup in the wrong place.
Last modified: 2011-11-05 11:56:12 UTC
Created attachment 200687 [details] testcas Hi, If, thanks to xi2, I have two master pointers, and I right click on a text view with a pointer, clipload popup is sometimes displayed near the other pointer. That's because gtk uses the first pointer it finds. We can fix this by using gtk_menu_popup_for_device and passing the correct device.
Created attachment 200689 [details] [review] patch proposal
The following fix has been pushed: 41d4229 Pop up context menus at the right device
Created attachment 200736 [details] [review] Pop up context menus at the right device When multiple pointers are in play, we need to be careful not to loose track of the device between receiving a button press and popping up a menu.
Review of attachment 200689 [details] [review]: Thanks for the patch, it looks mostly good ::: gtk/gtktextview.c.old @@ +8342,3 @@ info->button = 0; info->time = gtk_get_current_event_time (); + info->device = NULL; In the else case here, this function is most likely called by ::popup-menu, so it's triggered by a keyboard event, you could better resort to: keyb = gtk_get_current_event_device (); if (keyb && gdk_device_get_source (keyb) == GDK_SOURCE_KEYBOARD) info->device = gdk_device_get_associated_device (keyb);
Oh, this came across too late, had this bug opened since yesterday...