Commit Graph

647 Commits

Author SHA1 Message Date
Jan Horak
4a0dbe414e Bug 1582679 - Rewrite popup hiding on wayland; r=stransky
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).

We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.

Differential Revision: https://phabricator.services.mozilla.com/D47610

--HG--
extra : moz-landing-system : lando
2019-10-02 13:21:56 +00:00
Martin Stransky
41e46a8792 Bug 1578464 - [Wayland] Set opaque region for toplevel window, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47602

--HG--
extra : moz-landing-system : lando
2019-10-02 08:57:44 +00:00
Brindusan Cristian
bc0bc5f832 Backed out changeset 30310d7d693a (bug 1582679) for mochitest assertions at nsWindow.cpp:3766. CLOSED TREE 2019-10-02 00:14:31 +03:00
Jan Horak
730e9ad9d9 Bug 1582679 - Rewrite popup hiding on wayland; r=stransky
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).

We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.

Differential Revision: https://phabricator.services.mozilla.com/D47610

--HG--
extra : moz-landing-system : lando
2019-10-01 13:14:02 +00:00
Martin Stransky
9691b5d142 Bug 1536747 - [Linux] PictureInPicture window - open window manager menu on right mouse click, r=jhorak
This patch depends on Bug 1584492.

Differential Revision: https://phabricator.services.mozilla.com/D47424

--HG--
extra : moz-landing-system : lando
2019-09-27 15:14:23 +00:00
Martin Stransky
43b2ca4820 Bug 1583852 - [Linux] Disable round corners/alpha blending for PictureInPicture windows, r=jhorak
This bug depends on Bug 1584492.

Differential Revision: https://phabricator.services.mozilla.com/D47415

--HG--
extra : moz-landing-system : lando
2019-09-27 15:13:52 +00:00
Martin Stransky
47f4838fa0 Bug 1584492 [Linux] Add mIsPIPWindow to nsWindow, r=jhorak
Depends on D47409

Differential Revision: https://phabricator.services.mozilla.com/D47410

--HG--
extra : moz-landing-system : lando
2019-09-28 06:55:54 +00:00
Martin Stransky
39d980d661 Bug 1575136 - [Linux/Gtk] Set initial wm_role for windows, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47217

--HG--
extra : moz-landing-system : lando
2019-09-26 12:11:44 +00:00
Martin Stransky
ded82a61e2 Bug 1584139 [Linux/CSD] Add decoration size to nsWindow::LockAspectRatio() when CSD mode is used, r=jhorak
Depends on D47234

Differential Revision: https://phabricator.services.mozilla.com/D47235

--HG--
extra : moz-landing-system : lando
2019-09-26 12:03:32 +00:00
Martin Stransky
ae44a5d195 Bug 1584139 - [Linux/Gtk] Provide logging to nsWindow::Resize(), nsWindow::SetWindowDecoration(), nsWindow::SetDrawsInTitlebar(), r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47234

--HG--
extra : moz-landing-system : lando
2019-09-26 12:05:03 +00:00
Martin Stransky
b39e038df7 Bug 1583737 - Implement nsWindow::LockAspectRatio() on Linux, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47046

--HG--
extra : moz-landing-system : lando
2019-09-26 07:57:57 +00:00
Martin Stransky
ce56a99d89 Bug 1578464 - [Wayland] Set opaque region to wl_surface of toplevel window, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D46280

--HG--
extra : moz-landing-system : lando
2019-09-20 12:58:03 +00:00
Jan Horak
f1f19846f0 Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D46440

--HG--
extra : moz-landing-system : lando
2019-09-19 09:28:28 +00:00
Marius Gedminas
1fee916641 Bug 1550721 - Fix GTK title bar for tiled windows. r=stransky,dao
Differential Revision: https://phabricator.services.mozilla.com/D45500

--HG--
extra : moz-landing-system : lando
2019-09-17 12:05:00 +00:00
Brindusan Cristian
e32489a0d8 Backed out changeset 44d3452f6a07 (bug 1550721) for build bustages on nsWindow.cpp. CLOSED TREE 2019-09-17 02:27:52 +03:00
Marius Gedminas
880d097a69 Bug 1550721 - Fix GTK title bar for tiled windows. r=stransky,dao
Differential Revision: https://phabricator.services.mozilla.com/D45500

--HG--
extra : moz-landing-system : lando
2019-09-16 20:35:47 +00:00
Gurzau Raul
4793791015 Backed out changeset 84302aebbe43 (bug 1573813) for failing mochitest jobs on a CLOSED TREE. 2019-09-12 18:35:47 +03:00
Jan Horak
9f70c0454a Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale.

Differential Revision: https://phabricator.services.mozilla.com/D45649

--HG--
extra : moz-landing-system : lando
2019-09-12 13:29:03 +00:00
Jan Horak
ab88be917c Bug 1580174 - Don't use toplevel window as parent for the menus in popupnotification; r=stransky
Under Wayland where there's a strict popup window hierarchy, using toplevel window
for the submenus in popupnotification cause the popupnotification to hide
when opening them and this breaks user to Allow/Don't allow the action.

We have to use last opened popup window as a parent for these submenus.

Differential Revision: https://phabricator.services.mozilla.com/D45343

--HG--
extra : moz-landing-system : lando
2019-09-12 09:38:05 +00:00
Emilio Cobos Álvarez
a2e997b40b Bug 1578652 - Add a comment pointing to a gross gtk resize workaround. r=stransky
This was fixed upstream, so we can eventually remove this.

Having the issue number makes it much nicer to figure out when is the right time
to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D44624

--HG--
extra : moz-landing-system : lando
2019-09-04 08:18:12 +00:00
Martin Stransky
1cf5fdd9b6 Bug 1562827 - [Linux] Merge nsWindow::ReparentNativeWidgetInternal() to nsWindow::SetParent() and use nsWindow::ReparentNativeWidget() for toplevel windows only, r=karlt
- Use former ReparentNativeWidgetInternal() code in nsWindow::SetParent().
  Also update mToplevelParentWindow for Wayland to hold default toplevel window.

- Make nsWindow::ReparentNativeWidget() to work on toplevel windows only and use only gtk_window_set_transient_for() to reparent
  a toplevel window. Also update mToplevelParentWindow for Wayland.

Differential Revision: https://phabricator.services.mozilla.com/D43600

--HG--
extra : moz-landing-system : lando
2019-08-28 23:48:44 +00:00
Gurzau Raul
6321d98bb4 Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE. 2019-08-28 17:15:26 +03:00
Jan Horak
37a9627a4c Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

Differential Revision: https://phabricator.services.mozilla.com/D41947

--HG--
extra : moz-landing-system : lando
2019-08-27 13:03:50 +00:00
Kristen Wright
cff2295408 Bug 1573992 - Convert ui.context_menus.after_mouseup to static pref. r=njn
Converts ui.context_menus.after_mouseup varcache pref to a static pref and removes its associated function.

Differential Revision: https://phabricator.services.mozilla.com/D43519

--HG--
extra : moz-landing-system : lando
2019-08-27 00:07:49 +00:00
Csoregi Natalia
6c32e4cdbf Backed out changeset 4f82f0b92629 (bug 1573813) for browser-chrome crashes on /browser_bookmarkProperties_folderSelection.js. CLOSED TREE 2019-08-20 21:48:27 +03:00
Jan Horak
248e644f9e Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

Differential Revision: https://phabricator.services.mozilla.com/D41947

--HG--
extra : moz-landing-system : lando
2019-08-20 15:52:12 +00:00
Markus Stange
cc120aa3b7 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
There's no point in mutating it, and nobody does.

Differential Revision: https://phabricator.services.mozilla.com/D41679

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:39 +00:00
Csoregi Natalia
0989eb85a3 Backed out changeset 38b37dfa1f33 (bug 1469716) for causing Bug 1572116. a=backout 2019-08-16 04:36:30 +03:00
Jan Horak
74fb3f0f1c Bug 1572455 Workaround for restoring minimized window in Wayland; r=stransky
Under Wayland the GTK does not send the correct window state event change
when the window is iconified. We need to add a workaround for that to avoid
unresponsive UI after restoring the window.

Differential Revision: https://phabricator.services.mozilla.com/D41219

--HG--
extra : moz-landing-system : lando
2019-08-09 13:06:58 +00:00
Karl Tomlinson
a871c0a392 Bug 1469716 allow transparency mode to be set appropriately according to whether drawing a titlebar r=stransky
The early return for non-popup windows was to workaround
https://bugzilla.mozilla.org/show_bug.cgi?id=1344839 which involved problems
with CleanLayerManagerRecursive().  In cases where layer manager configuration
does not change, there is no need to clean the layer manager and so no need to
return early.

Differential Revision: https://phabricator.services.mozilla.com/D40145

--HG--
extra : moz-landing-system : lando
2019-08-05 08:27:20 +00:00
Martin Stransky
d4ee7064f5 Bug 1567434 - [Wayland] Use dynamic popup hierarchy for tooltips/context menu only, r=jhorak
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).

In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.

Depends on D39347

Differential Revision: https://phabricator.services.mozilla.com/D39348

--HG--
extra : moz-landing-system : lando
2019-08-05 10:37:34 +00:00
Martin Stransky
6354d2287a Bug 1567434 - [Wayland] Don't use gtk_window_get_transient_for() to get parent toplevel window, r=jhorak
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.

- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
  NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.

Differential Revision: https://phabricator.services.mozilla.com/D39347

--HG--
extra : moz-landing-system : lando
2019-08-05 10:37:21 +00:00
Brindusan Cristian
c00617be71 Backed out 2 changesets (bug 1567434) for build bustages at nsWindow.cpp:3587:53. CLOSED TREE
Backed out changeset 10925a6df9b3 (bug 1567434)
Backed out changeset 1cd94e91245c (bug 1567434)
2019-08-05 12:23:04 +03:00
Martin Stransky
577c3ffca3 Bug 1567434 - [Wayland] Use dynamic popup hierarchy for tooltips/context menu only, r=jhorak
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).

In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.

Depends on D39347

Differential Revision: https://phabricator.services.mozilla.com/D39348

--HG--
extra : moz-landing-system : lando
2019-08-05 08:40:16 +00:00
Martin Stransky
99f4b257a1 Bug 1567434 - [Wayland] Don't use gtk_window_get_transient_for() to get parent toplevel window, r=jhorak
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.

- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
  NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.

Differential Revision: https://phabricator.services.mozilla.com/D39347

--HG--
extra : moz-landing-system : lando
2019-08-05 08:39:53 +00:00
Jan Horak
65526f541b Bug 1566876 - Wayland workaround for the popups without parent r=stransky
When the popup is without parent it mess up with the Wayland popup hierarchy.
Then any other popup cannot be shown, for example when webrtc ui
shows up the user is unable to allow sharing screen during that.

Differential Revision: https://phabricator.services.mozilla.com/D38507

--HG--
extra : moz-landing-system : lando
2019-08-01 07:16:22 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
sotaro
41e801baab Bug 1566468 - Fix CompositorInitiallyPaused() r=nical
CompositorInitiallyPaused() uses mNeedsUpdatingEGLSurface. But it is not good. mNeedsUpdatingEGLSurface is set to true in moz_container_set_initial_draw_callback(). If compositor is created before moz_container_set_initial_draw_callback(), compositor is not initially paused. It happens sometimes with popup window.

Differential Revision: https://phabricator.services.mozilla.com/D38200

--HG--
extra : moz-landing-system : lando
2019-07-17 14:08:39 +00:00
sotaro
f2c65ceeb7 Bug 1565785 - Skip WR rendering until window becomes ready to draw on Wayland r=nical
Differential Revision: https://phabricator.services.mozilla.com/D37977

--HG--
extra : moz-landing-system : lando
2019-07-16 01:28:32 +00:00
Mihai Alexandru Michis
a2b90fe037 Backed out changeset b1f8f86bbda8 (bug 1565785) for causing bustages in nsWindow.h CLOSED TREE 2019-07-16 03:12:42 +03:00
sotaro
45b727fe13 Bug 1565785 - Skip WR rendering until window becomes ready to draw on Wayland r=nical
Differential Revision: https://phabricator.services.mozilla.com/D37977

--HG--
extra : moz-landing-system : lando
2019-07-15 14:33:04 +00:00
Martin Stransky
b43868db42 Bug 1562141 - [Wayland] Hide/show popup when it's positioned by gdk_window_move_to_rect() and it's visible, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D36331

--HG--
extra : moz-landing-system : lando
2019-07-01 05:59:45 +00:00
Gurzau Raul
b0fcd74087 Backed out changeset bb73a4c99331 (bug 1562141) for build failures at nsWindow.cpp on a CLOSED TREE. 2019-06-29 14:21:59 +03:00
Martin Stransky
40de4d717b Bug 1562141 - [Wayland] Hide/show popup when it's positioned by gdk_window_move_to_rect() and it's visible, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D36331

--HG--
extra : moz-landing-system : lando
2019-06-28 15:02:11 +00:00
Nicholas Nethercote
9f0b35cc2a Bug 1560837 - Make APZ static prefs follow the naming convention. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D35633

--HG--
extra : rebase_source : e71193756486b148d479e90b324f73dc35756429
2019-06-24 13:57:06 +10:00
myfreeweb
01916974b0 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
--HG--
extra : rebase_source : 69a374c26bcb8781e83aeb26058a2de349313bbc
extra : amend_source : 521bb6f2b5799bfca5f8b8b5bbe9e4fef1f2dd1e
2019-06-20 16:18:45 -04:00
Martin Stransky
73126f44cc Bug 1555866 - [Wayland] Don't position windows with zero height/width, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D33492

--HG--
extra : moz-landing-system : lando
2019-06-03 14:27:29 +00:00
Emilio Cobos Álvarez
21d5c25734 Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin
Only gtk returns failure ever, and nobody checks the result anyway.

Use an enum class so that it's clear from the caller what it means.

Differential Revision: https://phabricator.services.mozilla.com/D32353

--HG--
extra : moz-landing-system : lando
2019-05-31 22:13:56 +00:00
Martin Stransky
97b937e201 Bug 1555812 - [Linux][HiDPI] Pass device pixel coordinates to nsXULPopupManager::Rollup(), r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D33251

--HG--
extra : moz-landing-system : lando
2019-05-31 13:20:28 +00:00
Brindusan Cristian
bfa0a8a991 Backed out changeset c0895e6c7343 (bug 1553769) for causing build bustages at PluginWidgetProxy.cpp. CLOSED TREE 2019-05-30 01:00:20 +03:00