Граф коммитов

4269 Коммитов

Автор SHA1 Сообщение Дата
Dan Robertson 4e07ef747b Bug 1856196 - prefers-reduced-motion look and feel settings are initialized on linux. r=botond
The prefers-reduced-motion settings must be initialized before the value
is requested. If EnsureInit() has not been called before the
prefers-reduced-motion value is evaluated, we may return an unexpected
value of false.

Differential Revision: https://phabricator.services.mozilla.com/D192475
2023-11-06 14:11:06 +00:00
stransky 873a77588b Bug 1739622 [Linux] Create wider corner resizers for nsWindow::CheckResizerEdge() and restrict edge resize on Wayland r=emilio
- Create corner resizers larger to perform corner resize more comfortable
- Don't allow to grip West/North edges for resize on Wayland & windows with fixed aspect ratio. We can't resize such windows this way.

Differential Revision: https://phabricator.services.mozilla.com/D191758
2023-11-06 11:12:03 +00:00
stransky dbc6be0618 Bug 1739622 [Wayland] Emulate gdk_window_begin_resize_drag() for edge resize r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D191757
2023-11-06 11:12:03 +00:00
stransky fe713ef566 Bug 1857032 [Linux] Don't explicily call widget realize on nsWindow::Create() r=emilio
We don't need to call gtk_widget_realize() on nsWindow::Create() any more as we know if we use CSD decorations already.
Also use fast-path titlebar setting for unrealized widgets.

Differential Revision: https://phabricator.services.mozilla.com/D191172
2023-11-06 10:57:45 +00:00
stransky c576f61eb2 Bug 1859865 [Linux] Don't throw error message if DBus operation is canceled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192319
2023-11-06 10:39:10 +00:00
stransky 3312286f42 Bug 1762816 [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r=emilio
Don't autostart org.freedesktop.portal.Desktop by g_dbus_proxy_new_for_bus_sync(), that may block Firefox start for 30~ seconds after desktop start.
Use g_bus_watch_name() and get session data only if org.freedesktop.portal.Desktop is available.

Differential Revision: https://phabricator.services.mozilla.com/D192335
2023-11-06 09:40:32 +00:00
Noemi Erli 71f79e3173 Backed out changeset d160276b237a (bug 1762816) for causing failures in nsLookAndFeel.cpp CLOSED TREE 2023-11-04 11:11:29 +02:00
Cristian Tuns 94f23234fa Backed out changeset f65c77517e3e (bug 1859865) for causing build bustages in nsAppShell.cpp CLOSED TREE 2023-11-04 04:52:00 -04:00
stransky ec1ba0a90f Bug 1762816 [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r=emilio
Don't autostart org.freedesktop.portal.Desktop by g_dbus_proxy_new_for_bus_sync(), that may block Firefox start for 30~ seconds after desktop start.
Use g_bus_watch_name() and get session data only if org.freedesktop.portal.Desktop is available.

Differential Revision: https://phabricator.services.mozilla.com/D192335
2023-11-04 08:38:10 +00:00
stransky 624df138a4 Bug 1859865 [Linux] Don't throw error message if DBus operation is canceled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192319
2023-11-04 08:21:16 +00:00
Butkovits Atila bf6ab69197 Backed out changeset 1c0f7ecac0da (bug 1859865) for causing bustages at MPRISServiceHandler.cpp. 2023-11-04 01:59:29 +02:00
stransky ab9de8aaaa Bug 1859865 [Linux] Don't throw error message if DBus operation is canceled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192319
2023-11-03 21:13:16 +00:00
Stanca Serban 65229558a0 Backed out 2 changesets (bug 1837907) for causing xpcshell failures in marSuccessPartialWhileBackgroundTaskRunning.js. CLOSED TREE
Backed out changeset ff3a75dbd146 (bug 1837907)
Backed out changeset a78b3fba98aa (bug 1837907)
2023-11-03 17:25:27 +02:00
stransky fb794e6179 Bug 1837907 [Linux] Catch SIGTERM in nsAppShell and terminate Firefox by standard way r=jld
SIGTERM is supposed to be a standard way how to terminate Linux application. So don't fire emergency exit but run usual exit sequence.

Depends on D191077

Differential Revision: https://phabricator.services.mozilla.com/D191079
2023-11-03 13:41:59 +00:00
stransky 7c8857ba1d Bug 1862159 [Linux] Add IsCancelledGError() to detect DBus operation cancellation r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192621
2023-11-02 22:42:48 +00:00
stransky a6bada96f7 Bug 1861615 [Linux] Fallback to another idle service type from UserIdleServiceMutter::PollIdleTime() r=emilio
Allow to switch to another idle service type if UserIdleServiceMutter::PollIdleTime() fails. We recently see that failures on Mozilla try servers as:
Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files

Differential Revision: https://phabricator.services.mozilla.com/D192208
2023-11-02 20:54:22 +00:00
stransky 28699d5d0e Bug 1861615 [Linux] Get idle time async from DBus r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192061
2023-11-02 20:54:21 +00:00
Noemi Erli 3503a61e7a Backed out changeset c49f13a2dc69 (bug 1861615) for causing failures in test_bug343416.xhtml and test_ext_idle.html CLOSED TREE 2023-10-27 20:38:27 +03:00
stransky b11e2be835 Bug 1861615 [Linux] Get idle time async from DBus r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192061
2023-10-27 14:19:10 +00:00
Alexandre Lissy c6286f0f8f Bug 1666084 - Build MPRIS name with DBus unique name r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D191858
2023-10-27 09:29:31 +00:00
Narcis Beleuzu 491bb648e7 Backed out changeset a1dbe7d20995 (bug 1666084) for GTest failure on MPRISServiceHandler.cpp . CLOSED TREE 2023-10-27 00:16:14 +03:00
Alexandre Lissy c1897abd04 Bug 1666084 - Build MPRIS name with DBus unique name r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D191858
2023-10-26 19:20:28 +00:00
Emilio Cobos Álvarez 73b1942f93 Bug 1860386 - Use non-native drawing for -moz-menulist-arrow-button. r=stransky
The current code is unused, because we hide the combobox dropmarker in:

 * https://searchfox.org/mozilla-central/rev/cc35ffeaf33a3f4e0b2ce6b77f9e5817a705e0c8/toolkit/themes/linux/global/menulist.css#46

If you remove that rule, you'll see that what we draw is very far from a
dropmarker.

Use non-native rendering like windows to have a proper implementation of
this if someone needs it, and remove the native code.

Remove parentfocused check which can't ever work (that attribute isn't
set anywhere).

Differential Revision: https://phabricator.services.mozilla.com/D191563
2023-10-24 21:20:56 +00:00
Christian Holler 7712cd8254 Bug 1859976 - Handle unsupported clipboard type in GTK widget code. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D191391
2023-10-24 08:44:18 +00:00
Andrew Osmond 08581c22f1 Bug 1860048 - Enable threadsafe GL and DMABUF on NVIDIA 545.23.6+ on Linux for early beta and earlier. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D191430
2023-10-19 13:32:56 +00:00
Edgar Chen 96afd3a327 Bug 1856052 - Remove unused parameter from SetNativeClipboardData; r=geckoview-reviewers,win-reviewers,spohl,mhowell,m_kato
After bug 1851817, all platforms uses nsBaseClipboard as base class and clipboard
owner is handled there, so nsIClipboardOwner parameter is unused.

Differential Revision: https://phabricator.services.mozilla.com/D190236
2023-10-17 13:15:31 +00:00
Alexander Sergeyev d3e9ab0308 Bug 1855731 - Include WakeLockListener regardless of dbus support r=stransky
Fix a compile error caused by WakeLockListener being used without the
corresponding header due to the header being included only when dbus is
enabled. Since WakeLockListener works without dbus as well, the fix is
to make the inclusion unconditional.

Differential Revision: https://phabricator.services.mozilla.com/D191034
2023-10-17 06:49:12 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
stransky 18bd527479 Bug 1532281 [Linux] Don't build with dbus-glib r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187208
2023-10-12 12:59:08 +00:00
Emilio Cobos Álvarez 25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
stransky d46db64f3b Bug 1856627 [Linux] Use BTN_FORWARD (mouse button 10) to web navigate forward r=emilio
Recently we use BTN_SIDE (Button 8) to navigate web back, BTN_EXTRA (Button 9) to navigate web forward.
In this patch add BTN_FORWARD (Button 10) to also navigate web forward.

Differential Revision: https://phabricator.services.mozilla.com/D190153
2023-10-05 10:21:39 +00:00
Edgar Chen d1b1de4748 Bug 1851817 - Part 4: Make GTK nsClipboard use nsBaseClipboard; r=stransky
Depends on D188251

Differential Revision: https://phabricator.services.mozilla.com/D188252
2023-10-04 20:47:40 +00:00
Edgar Chen ddb1c2d724 Bug 1851817 - Part 3: Make GTK support clipboard data sequence number; r=stransky
Depends on D188250

Differential Revision: https://phabricator.services.mozilla.com/D188251
2023-10-04 20:47:40 +00:00
stransky 0dcdcf1967 Bug 1856582 [Linux] Handle gtk_init failure better and explicitly quit r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189920
2023-10-04 09:50:52 +00:00
Sandor Molnar f15867f9fe Backed out 5 changesets (bug 1851817) for causing wpt failures on clipboard-apis/async-promise-write-blobs-read-blobs.https.html CLOSED TREE
Backed out changeset 72e7e4417cc9 (bug 1851817)
Backed out changeset 7c035f460830 (bug 1851817)
Backed out changeset 0ea5e417de98 (bug 1851817)
Backed out changeset b46e4efa80ae (bug 1851817)
Backed out changeset f3c15030aa8a (bug 1851817)
2023-10-04 05:22:17 +03:00
Edgar Chen eecfc4f330 Bug 1851817 - Part 4: Make GTK nsClipboard use nsBaseClipboard; r=stransky
Depends on D188251

Differential Revision: https://phabricator.services.mozilla.com/D188252
2023-10-03 22:49:10 +00:00
Edgar Chen 2873d8e258 Bug 1851817 - Part 3: Make GTK support clipboard data sequence number; r=stransky
Depends on D188250

Differential Revision: https://phabricator.services.mozilla.com/D188251
2023-10-03 22:49:10 +00:00
stransky 59eb8d18f9 Bug 1854450 [Linux] Add GDBusMethodInvocation RefPtr support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189353
2023-10-02 11:35:26 +00:00
Emilio Cobos Álvarez 61c6eccd2a Bug 1855510 - Add container implementations for wayland. r=stransky
They weren't there before, but bug 1855461 made it obvious, and that
seems like an oversight.

Differential Revision: https://phabricator.services.mozilla.com/D189401
2023-09-28 07:57:24 +00:00
Emilio Cobos Álvarez f5dcdf7b2d Bug 1855461 - Make sure moz_container_destroy runs on Wayland too. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D189385
2023-09-27 19:57:34 +00:00
filips 7332079ccc Bug 1854854 - Fix changing window class with attributes on Wayland. r=emilio
This patch fixes `nsWindow::RefreshWindowClass` to call `gdk_wayland_window_set_application_id` to set the application ID (or window class in x11 terminology) when using Wayland. The application ID is set to the value of the `windowclass` attribute if that attribute exists. When the attribute does not exist, the function is not called to keep the default application ID.

Additionally, `nsWindow::Show` has been updated to call `nsWindow::RefreshWindowClass` after the window is shown. This is needed as `gdk_wayland_window_set_application_id` does not work before the window is displayed, and all existing calls to `nsWindow::RefreshWindowClass` happened before the window was shown.

Differential Revision: https://phabricator.services.mozilla.com/D189062
2023-09-27 17:53:09 +00:00
Emilio Cobos Álvarez 98899f5e48 Bug 1855457 - Clear DMABufDevice on shutdown. r=stransky
This fixes an nsStringBuffer leak on shutdown with Wayland, because we
leak the render node among other things.

Differential Revision: https://phabricator.services.mozilla.com/D189374
2023-09-27 17:21:48 +00:00
Emilio Cobos Álvarez 48b6992e03 Bug 1854275 - Make system background colors a bit more precise. r=stransky
This makes non-native background rendering a bit nicer in themes like
Adwaita-dark or Yaru-dark, and in general should be more correct, since
that's how backgrounds are drawn (image over color).

Differential Revision: https://phabricator.services.mozilla.com/D188774
2023-09-21 13:54:54 +00:00
Mike Conley e7d94c593a Bug 1852839 - Part 2: Implement nsIFilePicker.isModeSupported for the GTK backend. r=emilio
Folder selection is only possible in newer versions of xdg-desktop-portal, so
we implement isModeSupported so that we can check for this capability at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D188359
2023-09-19 19:44:51 +00:00
Cosmin Sabou 787c9b77e5 Backed out 2 changesets (bug 1852839) for causing build bustages on nsFilePicker.cpp. CLOSED TREE
Backed out changeset ac93fddded79 (bug 1852839)
Backed out changeset 6235d3df9ecf (bug 1852839)
2023-09-19 21:36:34 +03:00
Mike Conley 19350f8fbe Bug 1852839 - Part 2: Implement nsIFilePicker.isModeSupported for the GTK backend. r=emilio
Folder selection is only possible in newer versions of xdg-desktop-portal, so
we implement isModeSupported so that we can check for this capability at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D188359
2023-09-19 17:57:40 +00:00
stransky 51887ff098 Bug 1852918 [Linux] Don't disable system titlebar from nsWindow::Create() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188233
2023-09-14 12:57:28 +00:00
Sylvestre Ledru d206e54665 Bug 1852997 - Remove useless declarations in gtk code r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D188106
2023-09-14 10:56:29 +00:00
stransky c95e76422f Bug 1852879 [Linux] Polish gtk_window_set_titlebar() calls r=emilio
Depends on D188072

Differential Revision: https://phabricator.services.mozilla.com/D188073
2023-09-13 10:03:11 +00:00
stransky 86cce61b9c Bug 1852879 [Linux] Disable system titlebar early only for toplevel windows without parent r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188072
2023-09-13 10:03:10 +00:00
stransky e2819ed45b Bug 1850968 [Linux] Assert if mIdleService is already set in nsUserIdleServiceGTK::ProbeService() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188067
2023-09-13 08:53:31 +00:00
stransky 7aa5ec67ec Bug 1847336 [Linux] Propagate SetEGLNativeWindowSize() to WebRender/OGL compositor r=emilio
Propagate return code from nsWindow::SetEGLNativeWindowSize() to WebRender/OGL compositors.
It allows to skip rendering in case of incompatible recent EGL buffer size.

Depends on D187889

Differential Revision: https://phabricator.services.mozilla.com/D187890
2023-09-12 18:32:44 +00:00
stransky a8dd741056 Bug 1847336 [Linux] Don't adjust EGLWindow size for recent scale by MozContainer r=emilio
If screen scale doesn't match requested EGLWindow size, doesn't adjust requested EGLWindow size but rather fail and report it back.
We can't update EGLWindow size imediatelly as EGL surface buffers are already created and wl_egl_window_resize() is effective for next rendering cycle,
so recent rendering will use old and incompatible screen size.

Differential Revision: https://phabricator.services.mozilla.com/D187889
2023-09-12 18:32:44 +00:00
stransky a1eed7162a Bug 1852724 [Linux] Call nsWindow::SetDrawsInTitlebar() early to avoid mShell/Container widget reparent r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187973
2023-09-12 10:29:20 +00:00
stransky 7aead8cc3d Bug 1850968 [Linux] Don't ref/unref nsUserIdleServiceGTK in its constructor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187874
2023-09-12 07:29:19 +00:00
Emilio Cobos Álvarez 0a7c21b9a6 Bug 1852153 - Don't use move-to-rect if layout has constrained popup. r=stransky
This is an edge case where layout thinks the popup doesn't need
flipping, but the compositor does.

In an ideal world we'd convince the compositor it doesn't by providing
our margins, but that doesn't seem easily doable.

So check whether there was a constraint rect that we tried to honor
instead, rather than whether we actually had to flip or what not.

Differential Revision: https://phabricator.services.mozilla.com/D187823
2023-09-11 13:20:51 +00:00
Emilio Cobos Álvarez 77dbe59988 Bug 1852365 - Enable hide-cursor-while-typing on Linux. r=stransky
This is the default on macOS (implemented at the system level somehow,
apparently?), and Windows (bug 1757463).

After a quick look, most "native" editing applications on Linux support
this. Quick ones I tested:

 * Gedit, gtk4-demo (while hovering over the editable area)
 * Kate, Konsole, KWrite

LibreOffice does not, ironically.

Anyways, I think this is worth trying? Leave a pref for ease of turning
it off just in case.

Differential Revision: https://phabricator.services.mozilla.com/D187827
2023-09-11 11:17:23 +00:00
Emilio Cobos Álvarez 725452bc38 Bug 1852153 - Don't log in GetTopLevelWindow. r=stransky
Now we call this more often it becomes very noisy.

Differential Revision: https://phabricator.services.mozilla.com/D187799
2023-09-08 20:39:32 +00:00
Emilio Cobos Álvarez 95c77f8243 Bug 1851502 - Remove useless calls to NotifyThemeChanged. r=stransky
Font DPI is explicitly observed here already, and it's the only thing
that affects system font sizes:

  https://searchfox.org/mozilla-central/rev/8a1e1397c48c7419533dec707fd86dc2d8bf6bf9/widget/gtk/nsLookAndFeel.cpp#140

I found these because we get an extra notification here, which can slow
down our startup time on Wayland:

  https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6375

I'll see if there's a reasonable way to work around it, because the
event is posted async so it doesn't seem trivial to distinguish the fake
event from an actually useful change...

Differential Revision: https://phabricator.services.mozilla.com/D187390
2023-09-07 13:26:40 +00:00
Emilio Cobos Álvarez 82fb98de45 Bug 1851502 - Fix OnScaleChanged logging. r=stransky
As per the other review comments.

Differential Revision: https://phabricator.services.mozilla.com/D187432
2023-09-07 09:32:17 +00:00
Edgar Chen 380f88e2e5 Bug 1649579 - [GTK] Do not clear clipboard data on exit; r=stransky
Bug 311340 tried to fix a similar issue, but have to clear clipboard in nsClipboard's
destructor in order to avoid crash while calling gdk_display_close() on exit,
see bug 531580. But after bug 1626536, we are no longer calling gdk_display_close()
on exit, I don't see the same crash as bug 531580 anymore, either.

Differential Revision: https://phabricator.services.mozilla.com/D187595
2023-09-07 06:44:26 +00:00
Emilio Cobos Álvarez 726f71faf3 Bug 1850827 - Simplify how we draw window decorations. r=stransky,rmader,desktop-theme-reviewers,dao
This makes the rounded bottom corners work on X11, and makes the top
corner drawing less insane.

Differential Revision: https://phabricator.services.mozilla.com/D187345
2023-09-06 11:07:58 +00:00
Emilio Cobos Álvarez 59c3d35200 Bug 1811486 - Re-enable panel animations on KDE+X11. r=stransky
Bug 1843700 is basically a dupe of the bug that caused us to disable it.

Will look to enable it on wayland separately if we can.

Depends on D186126

Differential Revision: https://phabricator.services.mozilla.com/D186127
2023-09-06 01:03:31 +00:00
Emilio Cobos Álvarez 884175baf6 Bug 1850827 - Implement rounded bottom corners in GTK. r=rmader
The implementation is uglier than it needs to be. We basically need to
override the GTK styles for the window decorations with the desired
radius.

This is because of two reasons:

 * Adwaita on gtk3 doesn't provide a bottom corner radius.
 * Even if it did we couldn't reasonably query it, see comment 4.

So in order for stuff to look sensible we need to make sure that we and
GTK agree on what radius to use. Using the titlebar radius makes sense
here.

Differential Revision: https://phabricator.services.mozilla.com/D187343
2023-09-05 18:07:08 +00:00
Emilio Cobos Álvarez 02cec2af35 Bug 1851577 - Remove support for the drawintitlebar attribute. r=smaug
It was replaced by chromemargin, but some leftovers remained in the
tree.

Differential Revision: https://phabricator.services.mozilla.com/D187440
2023-09-05 13:26:46 +00:00
Emilio Cobos Álvarez a5071b4fe1 Bug 1849480 - Try to avoid unsuccessful theme switches when looking for alt theme. r=stransky
If you have something like Adwaita-dark, switching prefers-dark-theme is
useless. Try to first find a named light theme. Only if that fails try
to switch prefers-dark-theme.

Differential Revision: https://phabricator.services.mozilla.com/D187393
2023-09-05 09:39:32 +00:00
Stanca Serban 17fb8bac17 Backed out changeset 50b448b2d902 (bug 1532281) for causing Linux build bustages. CLOSED TREE 2023-09-05 11:38:18 +03:00
stransky 60dc5e2272 Bug 1532281 [Linux] Don't build with dbus-glib r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187208
2023-09-05 08:14:21 +00:00
stransky 245ddeebd9 Bug 1532281 [Linux] Remove dbus-glib code from GRefPtr.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187207
2023-09-05 07:53:46 +00:00
Landry Breuil 7ad9139e0b Bug 1847500: include the proper v4l2 header on OpenBSD/NetBSD/solaris r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D187209
2023-09-04 23:26:55 +00:00
Emilio Cobos Álvarez c9673ec98c Bug 1851127 - Compute scale in nsWindow::Create. r=stransky
As early as we can so that we don't use scale of 1 for too long.

Differential Revision: https://phabricator.services.mozilla.com/D187281
2023-09-04 13:45:41 +00:00
stransky 181e953979 Bug 1848677 Create kiosk nsWindow as fullscreen r=emilio
Depends on D187379

Differential Revision: https://phabricator.services.mozilla.com/D187380
2023-09-04 12:55:26 +00:00
stransky 8908dcd53e Bug 1848677 Don't fiddle with titlebar settins of kiosk nsWindow r=emilio
Depends on D187378

Differential Revision: https://phabricator.services.mozilla.com/D187379
2023-09-04 12:55:26 +00:00
Emilio Cobos Álvarez 8262c812df Bug 1851225 - Don't report screen shift in ScreenHelperGTK. r=stransky
This is basically bug 1795066, but for the non-ScreenGetterWayland
code-path.

Properly supporting GetWidgetScreen in ScreenGetterGTK caused this to
surface in environments where we'd otherwise reported the primary
monitor (which usually starts at 0, 0).

Differential Revision: https://phabricator.services.mozilla.com/D187297
2023-09-04 12:44:57 +00:00
stransky 12852c97de Bug 1844543 [Linux] Use mutex to ensure thread safe nsWindow destroy r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187099
2023-09-04 08:03:48 +00:00
stransky 73119cef95 Bug 1848589 [Linux] Don't query battery status on Linux as battery API is not used r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187200
2023-09-04 07:30:18 +00:00
Emilio Cobos Álvarez af3dea0c79 Bug 1849162 - Fix X11-only build.
MANUAL PUSH: Trivial fix CLOSED TREE
2023-08-31 16:58:04 +02:00
Emilio Cobos Álvarez a59976347b Bug 1849162 - Clean-up scale management a bit. r=stransky
Always pull and track the scale from the topmost window. Keep that one
always up-to-date, which makes accessing it cheaper.

Differential Revision: https://phabricator.services.mozilla.com/D186465
2023-08-31 13:57:23 +00:00
Emilio Cobos Álvarez 999fa5995b Bug 1849162 - Use FractionalScaleFactor() in a couple more places. r=stransky
It's the right scale to use for coordinate conversions in most cases.

Depends on D187100

Differential Revision: https://phabricator.services.mozilla.com/D187101
2023-08-30 10:24:42 +00:00
Emilio Cobos Álvarez 6a29f5901d Bug 1849162 - Rename WaylandPopupGetTopmostWindow to GetTopmostWindow. r=stransky
There's nothing wayland specific about it.

Differential Revision: https://phabricator.services.mozilla.com/D187100
2023-08-30 10:24:42 +00:00
Emilio Cobos Álvarez 3aed59e248 Bug 1849162 - Tweak dialog windows to also have vsync+compositor+occlusion tracking. r=stransky
I don't think there's any reason not to.

Depends on D186465

Differential Revision: https://phabricator.services.mozilla.com/D186841
2023-08-29 11:57:50 +00:00
Emilio Cobos Álvarez 4b3775e6ac Bug 1849793 - Use non-native rendering for menuarrows on Linux. r=dholbert,stransky
Differential Revision: https://phabricator.services.mozilla.com/D186712
2023-08-29 11:16:36 +00:00
stransky 0d1524e618 Bug 1832760 [Wayland] Adjust EGL window size according to scale factor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185000
2023-08-29 08:17:53 +00:00
stransky 71a30a55c5 Bug 1848599 [Linux] Replace gtk_widget_get_window(mShell) by GetToplevelGdkWindow() r=emilio
Depends on D186163

Differential Revision: https://phabricator.services.mozilla.com/D187000
2023-08-29 07:23:56 +00:00
stransky a1506ad75b Bug 1848599 Allow to place kiosk mode browser to selected monitor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186163
2023-08-29 07:23:56 +00:00
Martin Stransky d79720ccca Bug 1844543 [Wayland] Use nsWindow::GetCachedCeiledScaleFactor() to get scale factor from renderer/conpositor thread r=emilio
GdkCeiledScaleFactor() can't be called from non-main thread (compositor, renderer etc.).
In such case just return recent scale factor and don't update it.
If it's changed it will be updated from main thread later.

Differential Revision: https://phabricator.services.mozilla.com/D184171
2023-08-28 22:02:10 +00:00
Martin Stransky 7c83dccfcd Bug 1844543 [Wayland] Pass window scale to moz_container_wayland_set_scale_factor_locked() directly r=emilio
Remove hidden GdkCeiledScaleFactor() call from moz_container_wayland_set_scale_factor_locked() and pass it directly there.
It reduces number of GdkCeiledScaleFactor() calls and make sure scale is not changed surprisingly.

Differential Revision: https://phabricator.services.mozilla.com/D184170
2023-08-28 22:02:10 +00:00
Martin Stransky 5051b3580e Bug 1844543 [Wayland] Implement EGL size changes in MozContainer r=emilio
Move EGLWindow resize code from nsWindow to MozContainerWayland. It allows to use container lock and make the operation thread safe.

Depends on D184121

Differential Revision: https://phabricator.services.mozilla.com/D184122
2023-08-28 22:02:10 +00:00
Emilio Cobos Álvarez 50e7773ac3 Bug 1849162 - Add nsWindow::IsTopLevelWindowType() to check top-level-or-dialog. r=stransky
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D186840
2023-08-28 13:17:02 +00:00
Norisz Fay b152fbc1ec Backed out changeset cf6c6b12df92 (bug 1849162) for causing bustages on nsWindow.cpp CLOSED TREE 2023-08-28 14:09:57 +03:00
Emilio Cobos Álvarez de068a9fae Bug 1849162 - Add nsWindow::IsTopLevelWindowType() to check top-level-or-dialog. r=stransky
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D186840
2023-08-28 10:23:22 +00:00
Brad Werth 3d96d7be32 Bug 1831598: Add AMD 600 family to the Linux WebRender blocklist. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D186785
2023-08-24 15:50:47 +00:00
Andrew Osmond 00188ff292 Bug 1845946 - Part 2. Add plumbing for component services to be used in the GMP process. r=emilio,geckoview-reviewers,owlish
In order to bring the GMP process in closer alignment with how other
special purpose processes work, we need to be able to use the same
component services generally expected. This patch makes the GMP process
allow the same services as seen in the GPU/VR/RDD/Utility processes.

Differential Revision: https://phabricator.services.mozilla.com/D185336
2023-08-18 22:01:08 +00:00
Emilio Cobos Álvarez dd06dd9130 Bug 1824552 - Remove ScreenGetterWayland. r=stransky
This fixes screen sizes when using mutter with fractional scaling, and
shouldn't change behavior otherwise.

Without this patch, mutter with scale at 150% reports:

  [screen.width, screen.height] == [ 1920, 1080 ]

With this it reports the proper [ 2560, 1440 ].

The bug that caused us to introduce it was long fixed in gtk itself, as
I understand it, and ScreenGetterGtk is also what's used everywhere else
on Wayland.

Re-implement GetScreenForWindow in a way that works for ScreenGetterGtk
too, to avoid regressing any functionality on mutter.

Depends on D186341

Differential Revision: https://phabricator.services.mozilla.com/D186342
2023-08-16 21:08:28 +00:00
Emilio Cobos Álvarez d088678646 Bug 1824552 - Move ScreenHelper implementation details to the cpp file. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D186341
2023-08-16 21:08:28 +00:00
stransky 5517c3d79c Bug 1848084 Migrate WakeLockListener from dbus-glib to GDBus r=emilio
Migrate WakeLockListener from dbus-glib to GDBus and use AsyncDBus module for it.

Changes:

- Use AsyncDBus to implement DBus interfaces to WakeLockListener. It uses promises to handle async DBus calls.
- Enable to run Wayland/X11 WakeLockListener if DBUS is disabled
- Add more logging code

Differential Revision: https://phabricator.services.mozilla.com/D186100
2023-08-16 18:50:16 +00:00
stransky 874e49bdd9 Bug 1848764 [Wayland] Don't use UserIdleServiceX11() on Wayland only builds r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186209
2023-08-15 18:36:49 +00:00
Otto Länd 516f870d33 Bug 1767142: apply code formatting via Lando
# ignore-this-changeset
2023-08-15 18:02:41 +00:00