Commit Graph

22883 Commits

Author SHA1 Message Date
Rui Matos
cde5454622 wayland-outputs: Delay wl_output destruction
This tries to avoid wayland clients getting disconnected for binding
to a wl_output that we already destroyed which is a known protocol
race condition, see https://phabricator.freedesktop.org/T7722 .

https://bugzilla.gnome.org/show_bug.cgi?id=789070
2017-12-15 14:45:27 +01:00
Benjamin Berg
ae460046ed monitor-manager-kms: Fix recently introduced build issue
The recent commit 6dd28bd2c7 "poll() on KMS fd on EAGAIN" backported
error handling code that does not apply to the gnome-3-26 branch.

https://bugzilla.gnome.org/show_bug.cgi?id=791024
2017-12-14 20:42:45 +01:00
Benjamin Berg
6dd28bd2c7 monitor-manager-kms: poll() on KMS fd on EAGAIN
When drmHandleEvent() returns an error and errno is set to EAGAIN,
instead of ending up in a busy loop, poll() the fd until there is
anything to read.

This is a simple backport of commit 406359bba1.

https://bugzilla.gnome.org/show_bug.cgi?id=791024
2017-12-11 10:44:28 +00:00
Marco Trevisan (Treviño)
bf91e2b4ca compositor: reset top_window_actor and remove it from windows when destroyed
When the top window actor is destroyed, we need to make sure that
all its references are removed or it could be picked again in next
windows sync, causing crashes.
Since the window might or might not be destroyed when removed (depending
weather animations are in progress over it or not), it's just safer
to wait it to be destroyed before cleaning up any of its reference.

https://bugzilla.gnome.org/show_bug.cgi?id=791006
2017-11-30 22:56:38 -05:00
Jonas Ådahl
205dc28eae monitor-manager: Compare keys when checking whether a config is complete
We only counted configured monitors and whether the config was
applicable (could be assigned), howeverwe didn't include disabled
monitors when comparing. This could caused incorrect configurations to
be applied when trying to use the previous configuration.

One scenario where this happened was one a system with one laptop
screen and one external monitor that was hot plugged some point after
start up. When the laptop lid was closed, the 'previous configuration'
being the configuration where only the laptop panel was enabled, passed
'is-complete' check as the number of configured monitors were correct,
and the configuration was applicable.

Avoid this issue by simply comparing the configuration key of the
previous configuration and the configuration key of the current state.
This correctly identifies a laptop panel with the lid closed as
inaccessible, thus doesn't incorrectly revert to the previous
configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=788915
2017-11-30 12:01:57 +08:00
Jonas Ådahl
ea538537ec monitor-config-manager: Don't include closed laptop panel in config key
When deriving the list of disabled monitors when creating new monitors
configs, don't include the laptop panel if the lid is currently closed,
as we consider the laptop panel nonexistent when the laptop lid is
closed when it comes to configuration.

The laptop panel connector(s) will either way be appropriately disabled
anyway, as the field listing disabled monitors in the configuration do
not affect actual CRTC/connector assignments.

https://bugzilla.gnome.org/show_bug.cgi?id=788915
2017-11-30 12:01:57 +08:00
Kukuh Syafaat
2e663265ae Update Indonesian translation 2017-11-29 12:14:07 +00:00
Pawan Chitrakar
789d740add Update Nepali translation 2017-11-26 05:19:41 +00:00
Aurimas Černius
4f1e63fd0c Updated Lithuanian translation 2017-11-25 21:46:16 +02:00
Rui Matos
ed989a2989 monitor-manager: Refuse to activate closed laptop panels
There's no good reason to allow this and it allows g-c-c to properly
show that such a configuration doesn't work.

https://bugzilla.gnome.org/show_bug.cgi?id=790336
2017-11-22 15:03:04 +01:00
Daniel van Vugt
d358edd525 eglnative: Use gnome-settings-daemon font settings
While the X11 backend gets its font settings from XSettings, the native
backend did not use any user font preferences till now. So all shell fonts
were rendered with grayscale un-hinted, which some people describe as
"blurry text in Wayland sessions".

Although it's somewhat confusing using the "xsettings" schema on eglnative,
this is consistent with what GTK does already for its Wayland backend. It
is also documented here:

https://wiki.gnome.org/Initiatives/Wayland/GTK%2B#XSettings
https://wiki.gnome.org/Initiatives/Wayland/gnome-settings-daemon#xsettings

No more blurry shell text in Wayland sessions.

https://bugzilla.gnome.org/show_bug.cgi?id=645433
2017-11-17 15:35:39 -05:00
Carlos Garnacho
acab829cc4 compositor: Fix build
Unused variable definition. The fixup didn't make it to the previous
commit.
2017-11-17 17:00:05 +01:00
Carlos Garnacho
d1e32e170e compositor: End MetaDnd grab on plugin grab end
We must emit ::dnd-leave to pair the ::dnd-enter that shall be
emitted whenever the plugin grab begins, otherwise we leave
listeners unable to clean up if the plugin begins and ends a
grab while there is an ongoing DnD operation.

https://bugzilla.gnome.org/show_bug.cgi?id=784545
2017-11-17 14:44:06 +01:00
Milo Casagrande
32a151094d Update Italian translation 2017-11-17 13:31:09 +00:00
Muhammet Kara
8c45fbfb58 Update Turkish translation 2017-11-15 20:50:19 +00:00
Marek Cernocky
26ee55a7e4 Updated Czech translation 2017-11-15 13:34:07 +01:00
Charles Monzat
6797be5e1e Update French translation 2017-11-14 08:11:36 +00:00
Anders Jonsson
f4b4ef32ed Update Swedish translation 2017-11-13 23:44:18 +00:00
Christian Kirbach
cdfeecc318 Update German translation 2017-11-11 21:20:07 +00:00
Rafael Fontenelle
19cde75acc Update Brazilian Portuguese translation 2017-11-11 18:56:59 +00:00
Piotr Drąg
b86e0f0fd4 Update Polish translation 2017-11-10 19:30:41 +01:00
Piotr Drąg
7f3da7511a Update POTFILES.in 2017-11-10 19:17:44 +01:00
Olivier Fourdan
cc49f6ef78 Add restore-shortcuts to key bindings list
gnome-control-center uses this to list the keybindings, without this
users cannot change the default key combo to restore shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=789386
2017-11-10 18:03:12 +01:00
Olivier Fourdan
1d882886ba wayland: Use Super+Escape to re-enable shortcuts
Change the default key combo to re-enable normal keyboard shortcuts
processing while a shortcut inhibitor is in effect to Super+Escape as
primary system modifier key should be Super.

This should reduce the risk of potential conflict with other shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=789386
2017-11-10 18:03:09 +01:00
Jonas Ådahl
3572502a73 window/wayland: Handle resizing when headless
We tried to get the geometry scale, which may depend on the main
logical monitor assigned to the window. To avoid dereferencing a NULL
logical monitor when headless, instead assume the geometry scale is 1.

https://bugzilla.gnome.org/show_bug.cgi?id=788764
2017-11-10 10:21:57 +08:00
memeka
ce7dbfb3d9 renderer/native: Also allow EGL_KHR_platform_gbm extension string
Proprietary drivers such as ARM Mali export EGL_KHR_platform_gbm instead
of EGL_MESA_platform_gbm. As such, GBM platform check should be done for
both MESA and non-MESA drivers.

https://bugzilla.gnome.org/show_bug.cgi?id=780668
2017-11-09 18:20:17 +08:00
Benoit Gschwind
74e88dd18f backend: Reset current device id when current device removed
Bluetooth mouse usually goes in sleep state after a timeout, when that
happen the mouse is disconnected and on_device_removed function is
called. Before the patch if a touch device is available the
on_device_removed function hide the cursor. The issue is that the cursor
does not reappear once the bluetooth mouse is reconnected because
MetaBackend::current_device_id is not invalidated when on_device_removed
was called.

The patch set MetaBackend::current_device_id to 0 if the current device
is removed. This will make update_last_device to be triggered as soon as
another input device is used or the bluetooth mouse reconnect, as
consequence that the cursor reappear. The id 0 is never given to devices
and can safely used as undefine id.

https://bugzilla.gnome.org/show_bug.cgi?id=761067
2017-11-09 17:46:15 +08:00
Carlos Garnacho
8d7f425de4 backends: Plug leaks
The DRM properties container must be destroyed with
drmModeFreeObjectProperties.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-07 11:02:07 +01:00
Carlos Garnacho
2882ddec7b core: Plug leaks
The MetaWorkspaceLogicalMonitorData structs are leaked, and so is the
stamps hashtable in MetaDisplay.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-07 10:50:02 +01:00
Carlos Garnacho
0b10df1faa wayland: Plug leak
The remote DBus error is leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-07 10:49:54 +01:00
Carlos Garnacho
3db950b307 clutter: Plug evdev ClutterDeviceManager leaks
The unused ID GList element is leaked, and so is the node path.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-07 10:49:46 +01:00
Carlos Garnacho
cc311dc8e6 compositor: Keep reference to the screen on the MetaBackground
This is not a leak per se, but it seems too easy to make valgrind
SIGSEGV due to MetaBackground disconnecting signals from an already
destroyed MetaScreen when trying to SIGTERM gnome-shell. Keeping a
reference fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=789984
2017-11-07 10:49:38 +01:00
Marc-Antoine Perennou
0cd07cd864 build-sys: allow explicitely disabling remote-desktop and egl-device
https://bugzilla.gnome.org/show_bug.cgi?id=789958

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-06 13:44:45 +01:00
Kjartan Maraas
cac1fea4de Updated Norwegian bokmål translation. 2017-11-06 13:42:41 +01:00
Florian Müllner
17e5cd8c46 Bump version to 3.26.2
Update NEWS.
2017-11-02 16:54:54 +01:00
Jonas Ådahl
08e6aaa953 wayland/keyboard: Don't transfer layout group when replacing xkb state
The layout group determines what actual keyboard layout in the keymap
to use when translating modifier state and key codes to key syms.
When changing a keymap to another, the layout groups has no relation to
the layout groups in the old keymap, thus there is no reason to
transfer it to the new state.

This fixes an issue where the xkb state in meta-wayland-keyboard.c got
desynchronized with the xkb state in clutter-device-manager-evdev.c.

https://bugzilla.gnome.org/show_bug.cgi?id=789300
2017-11-02 12:07:56 +08:00
Jonas Ådahl
9187314216 monitor-manager-kms: Don't add outputs without modes
There seems to be a kernel race when one disconnects an external
monitor connected to a DisplayPort via a USB-C adapter. The race
results in a connector being reported as connected, but without any
modes supported.

This had the side effect that we tried to set a preferred mode to
the first listed mode, but as no modes were available, we instead tried
to dereference the first element of a NULL array, causing a
segmentation fault.

Mitigate this by skipping adding output if no supported modes are
advertised and the output doesn't support scaling, while moving the
fallback path for calculating a preferred output mode to after possibly
adding the common modes, to avoid the unvolentary NULL dereference.

https://bugzilla.gnome.org/show_bug.cgi?id=789501
2017-10-30 18:50:18 +08:00
Jonas Ådahl
634f48a1cf monitor-manager: Don't free old state until logical monitors are replaced
Logical monitors keep pointers around to monitor objects, which themself
keep pointers aronud to outputs, which keeps pointer to modes and CRTCs.
To avoid causing crashes when using the logical monitor API (which
might use monitor APIs etc) between a hot plug and the time the logical
monitors are regenerated (which is done synchronously in the native
backend but asynchronously in the X11 backend), postpone the freeing of
the state that logical monitor references, until the logical monitor
state is regenerated.

On the native backend, this should have no significant effect, as the
logical state is always regenerated immediately after the hardware
state is updated, but on X11, this should fix race conditions when
events being processed between the hot plug and the hot plug result
tries to access the yet to be up to date state.

https://bugzilla.gnome.org/show_bug.cgi?id=786929
2017-10-30 18:49:39 +08:00
Carlos Garnacho
656f64f3a5 backends: Unref variants obtained from g_variant_iter_get_next_value()
Those are being leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=789553
2017-10-27 13:21:34 +02:00
Jonas Ådahl
81341ec9a9 wayland/surface: Disconnect actor handlers before unassigning role
The handlers depend on a role being assigned. Destroying the window
causes it to become unmapped, which would sometimes trigger one of the
handlers, resulting in an is-assigned assert hitting in one of the
handlers. Avoid this by disconnecting the handlers earlier, so that
there is no risk that any them being triggered before the role is
assigned.

https://bugzilla.gnome.org/show_bug.cgi?id=789552
2017-10-27 18:55:45 +08:00
Daniel van Vugt
8335a75ae5 wayland: Allow Xwayland to leave core dumps
For historical Xorg-reasons, Xwayland would disable its own core dumps by
default. This is a problem because Xwayland crashing is the biggest cause of
gnome-shell crashes [1][2], and we still have no idea why due to there being
no dumps from Xwayland. So enable core dumping from Xwayland.

https://bugzilla.gnome.org/show_bug.cgi?id=789086

[1] https://bugs.launchpad.net/bugs/1505409
[2] https://bugs.launchpad.net/bugs/1556601
2017-10-26 20:10:56 -05:00
Carlos Garnacho
b7fc6480dd wayland: Update pointer confinement on surface actor relocations
In the unlikely case that a surface is moved by the compositor while
holding a pointer confinement, we also need to update the pointer
position when the surface actor gets moved.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-10-26 13:02:32 +02:00
Carlos Garnacho
d9ea3ceabe wayland: Trigger wl_output updates on actor position changes
Both notify::position on the surface actor and position-changed on
MetaWindow are listened to, in order to trigger wl_output updates for
wl_surfaces whenever the surfaces move across them.

Both signals are necessary in order to cater for toplevel and subsurface
relocations (Because it's the parent window actor what changes position
in this last case).

Also, shuffle signal disconnection, so each signal goes away with
the object reference held by MetaWaylandSurface.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-10-26 13:02:32 +02:00
Carlos Garnacho
6ef08c5018 backends/native: Fix handling of trackball settings
The org.gnome.desktop.peripherals.trackball.scroll-wheel-emulation-button
setting contains buttons X11-style. Work out the BTN evcode that applies
to it when applying the setting on the libinput device.

https://bugzilla.gnome.org/show_bug.cgi?id=787804
2017-10-26 13:02:32 +02:00
Marco Trevisan (Treviño)
8c35409eed MetaWindowActor: assert that we have plugin manager on simple effect
It looks that there are some extensions that run a Mainloop on startup,
causing to dispatch a clutter paint before the compositor is even available.
In such scenario a MetaWindow could try to start a simple effect
using a compositor plugin which is not there yet.

Then in order to catch these bugs we can now assert that the expected
conditions are valid, so that gnome-shell will provide a dumpstack to
debug the real offending JS code.

https://bugzilla.gnome.org/show_bug.cgi?id=789223
2017-10-24 04:46:37 -05:00
Marco Trevisan (Treviño)
f6659928b2 MetaLogicalMonitor: free the monitors list on finalize
https://bugzilla.gnome.org/show_bug.cgi?id=789227
2017-10-24 03:19:27 -05:00
Jeremy Bicha
79fe635f5f Revert "tests: Fix actor-anchors test"
This reverts commit dd451547a5.

since we reverted commit 5cb5baa with commit 193216c
2017-10-21 19:00:46 -04:00
Michael Catanzaro
193216c2a7 Revert "ClutterActor: Optimize away idempotent scale/position updates"
This reverts commit 5cb5baa7d4.

There's a cascade of regressions that needs to be sorted out before
relanding this:

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-19 19:55:49 -05:00
Rui Matos
6eacf9a398 compositor: Avoid a crash if the top window actor is finalized
Since we're not holding a reference, the top window actor might be
finalized when we paint resulting in a use after free crash.

https://bugzilla.gnome.org/show_bug.cgi?id=788493
2017-10-19 18:37:59 +02:00
Jonas Ådahl
297027b8cb monitor-unit-tests: Check non-first preferred modes
Check that if there are multiple modes with the same ID (resolution,
refresh rate and handled flags) we correctly add the preferred mode to
the list of monitor modes.

https://bugzilla.gnome.org/show_bug.cgi?id=789153
2017-10-19 10:54:28 +08:00