Closed Bug 510411 Opened 15 years ago Closed 2 years ago

Multiple XGrabServer on LeaveNotify events

Categories

(Core :: Widget: Gtk, defect, P5)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: karlt, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [fixed in bug 1798131])

Each time gdk_display_get_window_at_pointer() is called it grabs the X server and performs multiple XQueryPointer round-trips before ungrabbing. leave_notify_event_cb() in nsWindow.cpp causes gdk_display_get_window_at_pointer to be called twice. http://hg.mozilla.org/mozilla-central/file/43fdf17e10a3/widget/src/gtk2/nsWindow.cpp#l5448 http://hg.mozilla.org/mozilla-central/file/43fdf17e10a3/widget/src/gtk2/nsWindow.cpp#l2522 leave_notify_event_cb is called for each GdkWindow in the hierarchy that is crossed, so moving the mouse from browser content out of the app causes leave_notify_event_cb to be called at least 4 times, grabbing the server at least 8 times.
Flags: blocking1.9.2?
Whiteboard: [tsnap]
Note that there are a few calls in gtk that do ServerGrabs. (I'm told Tooltips are another item that do this - maybe also via gdk_display_get_window_at_pointer()?) Might be worth looking and figuring out if we're running into those as well.
Flags: wanted1.9.2+
Flags: blocking1.9.2?
Flags: blocking1.9.2-
Blocks: 297080
Blocks: 369599
Whiteboard: [tsnap] → [snappy]
Whiteboard: [snappy]
Assignee: karlt → nobody
I expect it would be possible to detect leave events from pointer grabs by comparing GdkEventCrossing::mode with GDK_CROSSING_GTK_GRAB. I wonder whether is_top_level_mouse_exit() is still required.
Blocks: 1456101
No longer blocks: 1456101
See Also: → 1456101
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1798131
Resolution: --- → FIXED
Whiteboard: [fixed in bug 1798131]
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.