Closed
Bug 1215104
Opened 9 years ago
Closed 7 years ago
[Wayland] nsWindow update for non-X11 backend
Categories
(Core :: Widget: Gtk, enhancement, P5)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox44 | --- | affected |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
(Whiteboard: tpi:+)
Attachments
(4 files, 2 obsolete files)
6.60 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
2.66 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
2.74 KB,
patch
|
Details | Diff | Splinter Review | |
1.06 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #635134 +++ We need to update nsWindow for non-X11 backends.
Assignee | ||
Comment 1•9 years ago
|
||
An initial patch for nsWindow. We'll also need to enable container window on Wayland when CSD changes land.
Attachment #8674223 -
Flags: review?(karlt)
Assignee | ||
Comment 2•8 years ago
|
||
There's an updated patch for nsWindow. It's pretty much all we need for Wayland support.
Attachment #8674223 -
Attachment is obsolete: true
Attachment #8674223 -
Flags: review?(karlt)
Attachment #8763587 -
Flags: review?(karlt)
Comment 3•8 years ago
|
||
Comment on attachment 8763587 [details] [diff] [review] nsWindow patch Please include commit messages in patches submitted for review. >+#include <sys/time.h> What needs this? >+ explicit CurrentX11TimeGetter(GdkWindow* aWindow, bool aIsX11Display) The GdkWindow already knows the kind of display, so keep the CurrentX11TimeGetter() interface simple and use GDK_IS_X11_WINDOW(). >+ return g_get_monotonic_time()/1000; Can you point me at the information that means this is the correct reference time, please? What happens with remote connections? > // gdk_x11_display_get_user_time tracks button and key presses, > // DESKTOP_STARTUP_ID used to start the app, drop events from external > // drags, WM_DELETE_WINDOW delete events, but not usually mouse motion nor > // button and key releases. Therefore use the most recent of > // gdk_x11_display_get_user_time and the last time that we have seen. >+ GdkDisplay *display = gdk_display_get_default(); >+ if (!GDK_IS_X11_DISPLAY(display)) >+ return sLastUserInputTime; >+ This code doesn't belong with this comment, so leave the comment with the associated code. But I guess sLastUserInputTime is just a placeholder for a Wayland implementation, so please either explain in comment why a complete implementation is not required for Wayland or file a follow-up bug and reference it in a comment here. > guint32 timestamp = > gdk_x11_display_get_user_time(gdk_display_get_default()); Please use |display| instead of getting it again. >- gtk_widget_set_double_buffered(widgets[i], FALSE); >+ if (mIsX11Display) >+ gtk_widget_set_double_buffered(widgets[i], FALSE); Why is it not necessary to disable double buffering with Wayland? Please put this in a separate commit, with a code comment explaining why.
Attachment #8763587 -
Flags: review?(karlt) → review-
Assignee | ||
Comment 4•8 years ago
|
||
Thanks, there's a patch with basic X display patch which also disables SHM on nsWindow. I'll address your comments in another one. I don't think we should call new nsShmImage() with invalid (null) mXDisplay, mXWindow, mXVisual, mXDepth variables.
Attachment #8763587 -
Attachment is obsolete: true
Attachment #8764160 -
Flags: review?(karlt)
Updated•8 years ago
|
Attachment #8764160 -
Flags: review?(karlt) → review+
Assignee | ||
Comment 6•8 years ago
|
||
Comment on attachment 8764160 [details] [diff] [review] X display patch Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=12c4650dbb7a
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Updated•8 years ago
|
Assignee: nobody → stransky
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/628f6daa21f2 Update nsWindow for non-X11 backend. r=karlt
Keywords: checkin-needed
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/628f6daa21f2
Assignee | ||
Comment 9•8 years ago
|
||
We need to disable start-up notification on Wayland. I know it can be disabled build-time but it may be useful to have one build setup for X11 and Wayland.
Attachment #8766253 -
Flags: review?(karlt)
Updated•8 years ago
|
Comment 10•8 years ago
|
||
Comment on attachment 8766253 [details] [diff] [review] start-up notification patch >+ if (mIsX11Display) { With all the pieces of code being disabled for Wayland, we need a way to track what remains to make the Wayland port feature comparable to the X11 port. This will be necessary before enabling Wayland by default when available can be considered. In this case, bug 726479 already exists. I've marked that blocking bug 635134. Please include a comment above this line to indicate that bug report for non-X11 ports. >+ if (sn_launchee_context_get_id_has_timestamp(ctx)) { >+ gdk_x11_window_set_user_time(gdkWindow, sn_launchee_context_get_timestamp(ctx)); Please wrap after ','.
Attachment #8766253 -
Flags: review?(karlt) → review+
Assignee | ||
Comment 11•8 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1daada2033bf
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 12•8 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/248114b54a90 Disable start-up notifications for non-X11 backends, r=karlt
Keywords: checkin-needed
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/248114b54a90
Comment 14•8 years ago
|
||
I'm getting the following error after this patch. 3:53.70 /opt/thunderbird_build/comm-central/mozilla/widget/gtk/nsWindow.cpp:1352:9: error: ‘mIsX11Display’ was not declared in this scope 3:53.70 if (mIsX11Display) { It looks like the "mIsX11Display" variable is not static and therefore can't be used in a static method.
Assignee | ||
Comment 15•8 years ago
|
||
I had to be blind to check mIsX11Display attribute in non-member and static function. Sorry for that. Please use this patch, it replaces the wrong variable with default display check. Karl, can you please review this one? Thanks.
Attachment #8776006 -
Flags: review?(karlt)
Comment 16•8 years ago
|
||
Comment on attachment 8776006 [details] [diff] [review] static-display.patch >Bug 1215104 - use gdk_display_get_default() instead of mIsX11Display attribute, r=?karlt Thanks. Please use 1286482 for the bug number, so we can track uplift to 50.
Attachment #8776006 -
Flags: review?(karlt) → review+
Updated•8 years ago
|
Priority: -- → P5
Whiteboard: tpi:+
Comment hidden (spam) |
Assignee | ||
Comment 18•7 years ago
|
||
Let's close this one and file new ones for separated issues.
You need to log in
before you can comment on or make changes to this bug.
Description
•