Closed
Bug 407982
Opened 18 years ago
Closed 18 years ago
More events should walk the Gdk tree instead of being dropped
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta3
People
(Reporter: ventnor.bugzilla, Assigned: ventnor.bugzilla)
Details
(Keywords: platform-parity)
Attachments
(1 file, 3 obsolete files)
|
10.91 KB,
patch
|
roc
:
review+
roc
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
We fixed the problem where you couldn't scroll while the cursor is over a plugin in bug 386687. More of these events should take the same approach; specifically, mouse events. This is especially problematic when autoscrolling because the speed/direction may not change (mousemove) or you can't cancel it with a click (mousedown/mouseup). This may (I don't know for certain) also allow Linux to receive mouse events on the DOM from plugin windows.
Attachment #292686 -
Flags: superreview?(roc)
Attachment #292686 -
Flags: review?(roc)
+ if (aEvent->window == mDrawingarea->inner_window) {
+ event.refPoint.x = nscoord(aEvent->x);
+ event.refPoint.y = nscoord(aEvent->y);
+ } else {
+ nsRect windowRect;
+ ScreenToWidget(nsRect(nscoord(aEvent->x_root), nscoord(aEvent->y_root), 1, 1), windowRect);
+
+ event.refPoint.x = windowRect.x;
+ event.refPoint.y = windowRect.y;
+ }
This code should be factored out and shared.
+ nsRefPtr<nsWindow> window;
+ GdkWindow *gdkWindow = event->window;
+ while (!(window = get_window_for_gdk_window(gdkWindow))) {
+ // See scroll_event_cb. We need this to get events even when cursor is over plugins.
+ gdkWindow = gdk_window_get_parent(gdkWindow);
+ if (!gdkWindow)
+ return FALSE;
+ }
This loop should be factored out and shared too. Something like
already_AddRefed<nsWindow> GetEventTargetWindow(GdkEvent*) or something.
| Assignee | ||
Comment 2•18 years ago
|
||
The first part can't be factored out because GDK event structures are evil, but the second part can be happily refactored.
Attachment #292686 -
Attachment is obsolete: true
Attachment #292827 -
Flags: superreview?(roc)
Attachment #292827 -
Flags: review?(roc)
Attachment #292686 -
Flags: superreview?(roc)
Attachment #292686 -
Flags: review?(roc)
+static nsWindow* get_first_nswindow_for_gdkwindow (GdkWindow *aGdkWindow);
Call this GetFirstNSWindowForGDKWindow
+ nsRefPtr<nsWindow> window = get_first_nswindow_for_gdkwindow(gdkWindow);
'window' should just be an nsWindow* (4 occurrences)
| Assignee | ||
Comment 4•18 years ago
|
||
Attachment #292827 -
Attachment is obsolete: true
Attachment #292828 -
Flags: superreview?(roc)
Attachment #292828 -
Flags: review?(roc)
Attachment #292827 -
Flags: superreview?(roc)
Attachment #292827 -
Flags: review?(roc)
| Assignee | ||
Comment 5•18 years ago
|
||
Forgot about unnecessary local variable during refactoring.
Attachment #292828 -
Attachment is obsolete: true
Attachment #292829 -
Flags: superreview?(roc)
Attachment #292829 -
Flags: review?(roc)
Attachment #292828 -
Flags: superreview?(roc)
Attachment #292828 -
Flags: review?(roc)
Attachment #292829 -
Flags: superreview?(roc)
Attachment #292829 -
Flags: superreview+
Attachment #292829 -
Flags: review?(roc)
Attachment #292829 -
Flags: review+
| Assignee | ||
Updated•18 years ago
|
Attachment #292829 -
Flags: approval1.9?
Updated•18 years ago
|
Attachment #292829 -
Flags: approval1.9? → approval1.9+
| Assignee | ||
Updated•18 years ago
|
Keywords: checkin-needed
Comment 6•18 years ago
|
||
Checking in widget/src/gtk2/nsCommonWidget.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsCommonWidget.cpp,v <-- nsCommonWidget.cpp
new revision: 1.34; previous revision: 1.33
done
Checking in widget/src/gtk2/nsCommonWidget.h;
/cvsroot/mozilla/widget/src/gtk2/nsCommonWidget.h,v <-- nsCommonWidget.h
new revision: 1.26; previous revision: 1.25
done
Checking in widget/src/gtk2/nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v <-- nsWindow.cpp
new revision: 1.242; previous revision: 1.241
done
Checking in widget/src/gtk2/nsWindow.h;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.h,v <-- nsWindow.h
new revision: 1.81; previous revision: 1.80
done
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•