Closed Bug 459532 Opened 16 years ago Closed 12 years ago

Faulty event compression in gtk2 widget implementation

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: toshok, Assigned: toshok)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch which fixes the problem (obsolete) — Splinter Review
Right now if there are multiple MotionNotify events in the X event queue, they are all compressed to 1 (the newest), regardless whether or not they're contiguous in the queue.  So, you can end up in situations where you have a queue that looks like this:

MotionNotify (100, 200) => ButtonPress (100, 200) => ButtonRelease (100, 200) => MotionNotify (200, 200)

and that gets compressed to:

MotionNotify (200, 200) => ButtonPress (100, 200) => ButtonRelease (100, 200)

Clearly that's broken.  This is due to XCheckWindowEvent being used, instead of Peek+Next event.  This usually won't be a problem, but it's definitely breaking our automated Moonlight testing using XTest, as that extension has the tendency to load up the client event queue.

I've attached a patch which fixes our issue and has no negative impact on normal usage.
Attachment #342750 - Attachment is obsolete: true
Assignee: nobody → toshok
Attachment #342751 - Flags: superreview?(roc)
Attachment #342751 - Flags: review?(roc)
Attachment #342751 - Flags: superreview?(roc)
Attachment #342751 - Flags: superreview+
Attachment #342751 - Flags: review?(roc)
Attachment #342751 - Flags: review+
Comment on attachment 342751 [details] [diff] [review]
doh, remove that printf..
[Checkin: Comment 8]

Thanks man!
"toshok@hungry.com": Please, supply your real name(s), not your email address only.
Keywords: checkin-needed
huh, I thought bugzilla had my real name already...  anyway, fixed.
Assignee: toshok → nobody
Assignee: nobody → toshok
Keywords: checkin-needed
(In reply to comment #3)
> "toshok@hungry.com": Please, supply your real name(s), not your email address
> only.

Even so, please don't remove the checkin-needed keyword for reasons like this. Bugs get lost when you do that. :(
ack - wasn't aware i'd done that - sorry :)
(In reply to comment #6)
> ack - wasn't aware i'd done that - sorry :)

You didn't. I was talking to Serge. :)
Comment on attachment 342751 [details] [diff] [review]
doh, remove that printf..
[Checkin: Comment 8]

http://hg.mozilla.org/mozilla-central/rev/1ce7fddcb2ce
Attachment #342751 - Attachment description: doh, remove that printf.. → doh, remove that printf.. [Checkin: Comment 8]
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
It looks like Stuart backed this out on the FENNEC_A1_BRANCH because it broke something: http://hg.mozilla.org/mozilla-central/rev/04cb6a409e9e
This should be backed out on trunk -- it's causing the fennec problems; need to figure out why (and why they're not being seen on the desktop).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
("fennec problems" = mouse events are very laggy, you touch the screen and move the mouse, and the app responds only after a second or so delay, with the motion that you did)
I think the problems on fennec are probably due to the maemo gtk2 patches that unconditionally enable xinput events thus breaking this hack to do event compression since every motion event is followed by a device motion event.  See bug 459780 for some more details.  Perhaps the right way to fix this is using motion hints properly instead of emulating them poorly.
This, probably appropriately, wasn't backed out on m-c trunk.
Status: REOPENED → RESOLVED
Closed: 16 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: