Open Bug 469756 Opened 11 years ago Updated 6 years ago

GDK_EXTENSION_EVENTS_CURSOR option is not enabled for gdk window

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set

Tracking

()

REOPENED

People

(Reporter: romaxa, Assigned: romaxa)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

After some changes in bug 428988, small part related to enabling GDK EXTENSIONS was missing.

We need to enable GDK_EXTENSION_EVENTS_ALL to have pressure events generation.
Attachment #353133 - Flags: review?(roc)
Pushed in:
http://hg.mozilla.org/mozilla-central/rev/0c0bf7bd8e7b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 469809
Depends on: 469841
No longer depends on: 469841
This was backed out to see if it caused bug 469809.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → romaxa
Preliminary results are that this backout did fix bug 469809.
Seems GDK_EXTENSION_EVENTS_ALL enable also other extensions which is affect on performance....
For pressure events generation enough to have GDK_EXTENSION_EVENTS_CURSOR mode.
Can we try again with CURSOR mode?
Attachment #353133 - Attachment is obsolete: true
Attachment #353300 - Flags: review?(roc)
Not sure but may be it also reasonable to add some preference which will enable and disable that modes...
Summary: GDK_EXTENSION_EVENTS_ALL option is not enabled for gdk window → GDK_EXTENSION_EVENTS_CURSOR option is not enabled for gdk window
Pushed in:
http://hg.mozilla.org/mozilla-central/rev/bdef726fb656
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Backed out again (Twinopen jumped). Next time please test first on try server and be around after checkin.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Sadly, but it seems jumping always when any gdk_window extensions enabled, for any events...
roc do you have any ideas is it gdk problem or moz gtk widgets implementation?
On maemo it is also the same problem topen jump ~10% :(
The description of GDK Input Devices says

"Because handling extended input devices may involve considerable overhead,
 they need to be turned on for each GdkWindow individually using
 gdk_input_set_extension_events()."

I had a quick look at the GDK Input Device code and saw that enabling
extension events would cause these functions that require X server round trips
to be used perhaps frequently from the callers indicated.

XTranslateCoordinates
 _gdk_input_get_root_relative_geometry
   gdk_input_set_extension_events
   _gdk_input_crossing_event if enter && extension_events
     send_crossing_event
       _gdk_synthesize_crossing_events in enter/leave situations (geometry change)
       proxy_pointer_event in some leave and enter events
         _gdk_windowing_got_event if is_motion_type(event->type)
   _gdk_input_configure_event if extension_events
     gdk_event_translate with ConfigureNotify events

XQueryDeviceState
  gdk_input_check_proximity for each enabled non-core device until one is found with InProximity
    _gdk_input_crossing_event if enter && extension_events
    _gdk_input_other_event with any input extension event
       gdk_event_translate
  gdk_device_get_state if !core
     gdk_event_request_motions if GDK_MOTION_NOTIFY && is_hint

These may or may not be the cause of the performance hit, but it is not
surprising that performance is affected.

In order to enable extension events, I suspect we would need to be very
selective about when they are enabled and/or have them controlled by a pref,
off by default - or do some performance work on the GDK code.

BTW, it seems that GTK needs to be configured --with-xinput for extension events.  That doesn't seem to be the default though distros may turn that on.
You need to log in before you can comment on or make changes to this bug.