1
0
Fork 0
Commit graph

22356 commits

Author SHA1 Message Date
Jonas Ådahl
a6646b32d0 wayland: Add common object for device classes
Add a new object class, MetaWaylandInputDevice, and make all device
classes (pointer, keyboard, touch) inherit it. In the future common
functionality may be placed there.

https://bugzilla.gnome.org/show_bug.cgi?id=771305
2016-09-15 09:54:55 +08:00
Jonas Ådahl
d2cdbd433d wayland/seat: Add API to check whether a seat has a device class
Meant to replace explicitly checking whether a
MetaWaylandPointer/MetaWaylandKeyboard/MetaWaylandTouch has a seat or
not to determine whether they are supposed to be active or not.

https://bugzilla.gnome.org/show_bug.cgi?id=771305
2016-09-15 09:53:43 +08:00
Charles Monzat
5d3cacf8d2 Updated French translation 2016-09-13 10:16:11 +00:00
Ask Hjorth Larsen
a9b78cea6b Updated Danish translation 2016-09-13 02:00:08 +02:00
Florian Müllner
bb25aa5e6b Bump version to 3.21.92
Update NEWS.
2016-09-12 23:56:38 +02:00
Carlos Garnacho
b52f304f9d backends: Use g-s-d settings for tablet configuration
This is needed to make the wayland backend react to configuration
changes until gnome-control-center is updated to use the
gsettings-desktop-schemas settings.

https://bugzilla.gnome.org/show_bug.cgi?id=771315
2016-09-12 21:51:00 +02:00
Rui Matos
9a076076c0 monitor-manager-kms: Add common modes
Some output devices only advertise their preferred mode even though
they're able to display others too. This means we can include some
common modes in each output's supported list.

This is particularly important for mirroring, since we can only mirror
outputs which are using the same resolution.

https://bugzilla.gnome.org/show_bug.cgi?id=744544
2016-09-12 20:02:03 +02:00
Piotr Drąg
5cae628f37 Add more options to XGETTEXT_OPTIONS in po/Makevars 2016-09-12 19:56:30 +02:00
Carlos Garnacho
0f0b25767d backends: Add comment to translators in "Switch monitor" string
Without context it's not clear to what it actually refers to. Add some
context.

https://bugzilla.gnome.org/show_bug.cgi?id=770929
2016-09-12 19:45:09 +02:00
Мирослав Николић
878fb6720a Updated Serbian translation 2016-09-11 09:10:10 +02:00
Fran Dieguez
f4c2da7499 Updated Galician translations 2016-09-11 00:49:16 +02:00
Changwoo Ryu
0559308812 Updated Korean translation 2016-09-10 18:16:54 +00:00
Piotr Drąg
30d2a94cb3 Updated Polish translation 2016-09-09 23:58:50 +02:00
Florian Müllner
2681647089 wayland: Fix type error
Until the setting is moved to gnome-desktop-schemas, we still use
our own enum.
2016-09-09 20:28:00 +02:00
Olivier Fourdan
4c106a9c9b wayland: save/restore numlock state
Save the state on NumLock so that is can be (optionally) restored on
next login.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=757943
2016-09-09 19:07:10 +02:00
Tiago Santos
a884e4540c Updated Portuguese translation 2016-09-09 17:01:34 +00:00
Baurzhan Muftakhidinov
f9fff98909 Updated Kazakh translation 2016-09-09 16:14:25 +00:00
Jonas Ådahl
abee020f71 wayland/pointer-constraints: Maybe constrain on pointer focus change
Since Xwayland surface constraints might need to enable not only
because the constrained window appears focused, add a pointer focus
listener and try constrain whenever the pointer focus changes. It's
still required that a Xwayland window is focused to activate.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
33ba06504b MetaWaylandPointerConstraints: Relax enable requirements for Xwayland
Xwayland surfaces are special, because there is no reliable way to
associate a window with its corresponding "application window" (the one
which was given focus). Many games that require pointer warping and
confining pointer grabs may for example create override redirect windows
and make that window receive input even though it will never be the
focus window.

Therefore, the requirements for enabling a constraint for a wl_surface
from Xwayland needs to be relaxed in order. This commit changes
Xwayland wl_surfaces to not require being focused to be enabled; it'll
be enabled as long as any X11 window is the one with focus.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
10c7035a71 MetaWaylandPointerConstraints: Require pointer focus to enable
Require pointer focus to enable, otherwise we can't guarantee it has
entered the surface, as the focus may have been given to a subsurface,
override-redirect or other sub window covering the surface that was
requested to have o pointer constraint.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
e6a20a025d MetaWaylandPointer: Add 'focus-surface-changed' signal
Add a signal that is emitted when the pointer focus surface of the
pointer device changes. This will later be used by the pointer
constraints to maybe enable pointer constraints when a surface receives
pointer focus.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
262b52da50 MetaWaylandPointerConstraints: Handle delayed window surface association
For Xwayland, a newly created wl_surface and X11 Window pair may not be
immediately associated, but Xwayland may still request a pointer
constraint on some of its wl_surface's. Handle the situation by
postponing maybe enabling the constraint until the window and surface
has been associated.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
fccdd00f74 MetaWaylandSurface: Move destroy signal even earlier
Move the MetaWaylandSurface::destroy signal before starting the actual
destruction, in wl_surface_destructor, so that all fields (e.g. surface
role) are intact when the listeners are invoked.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
3a41b0f221 xwayland: Add 'window-associated' signal to role
When the Xwayland wl_surface is created, it may not yet be possible to
associate it with the corresponding X11 Window. Add a signal to the
Xwayland role to communicate with any interested parties.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
e5a359a032 wayland: Make seat devices GObjects
This will make it possible to add signals and other GObject features.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
2016-09-09 10:09:46 +08:00
Jonas Ådahl
d893adb290 clutter: Compress instead of discard motion events
Clutter discards any motion event if next event happens to also be a
motion event. This is problematic when the motion event carries
relative motion deltas, since the information about them is completely
lost.

Until we have moved away made the stage stop discarding motion events,
lets work around the issue by compressing them, effectively adding
multiple relative motion deltas together, would one be discarded.

https://bugzilla.gnome.org/show_bug.cgi?id=771049
2016-09-09 10:03:34 +08:00
Jonas Ådahl
0c53677992 wayland/pointer-constraints: Send wl_pointer.frame when locked
We were not sending wl_pointer.frame after
wp_relative_pointer.relative_motion. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=770994
2016-09-09 10:03:16 +08:00
Jonas Ådahl
640178a94f wayland/cursor-role: Handle premature wl_buffer destruction
If a client would attach a buffer to a surface, commit, destroy the
buffer and then later set the surface as a cursor, there will be no
wl_buffer available to be used by the cursor role. Instead of
dereferencing the non-existing wl_buffer resource, handle this situation
by logging a warning and treating a prematurely destroyd wl_buffer as if
no buffer had been attached.

https://bugzilla.gnome.org/show_bug.cgi?id=770992
2016-09-09 10:02:41 +08:00
Jonas Ådahl
2e7f11305c MetaWindowActor: Sync thawed state when surface actor is set
Not having a surface actor would cause the window actor state to be
considered frozen, thus causing various state (such as geometry, shape
etc) synchronization to be delayed until thawed. If the window actor
was "thawed" due to having a surface set, not all state would be
properly synchronized, causing the thawed window actor to be displayed
incorrectly.

This patch fixes this by putting state synchronization after thawing in
a common function, calling it both from frozen count decreasing and
surface setting.

This fixes for example misplaced menus in Steam.

https://bugzilla.gnome.org/show_bug.cgi?id=770991
2016-09-09 10:00:24 +08:00
Trần Ngọc Quân
c1b5b76bf4 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2016-09-09 08:16:01 +07:00
Fran Dieguez
d164ce15f2 Updated Galician translations 2016-09-08 23:37:21 +02:00
Rūdolfs Mazurs
c9941f2d30 Update Latvian translation 2016-09-08 21:39:06 +03:00
Alexander Shopov
330c5ffef9 Update Bulgarian translation 2016-09-08 06:33:46 +03:00
Mario Blättermann
f83f5019cf Updated German translation 2016-09-07 16:56:36 +00:00
Rafael Fontenelle
7b55592cce Updated Brazilian Portuguese translation 2016-09-07 11:18:00 +00:00
Anders Jonsson
99aaec6ce4 Updated Swedish translation 2016-09-07 09:55:07 +00:00
Tiago Santos
880c9e379f Updated Portuguese translation 2016-09-07 05:38:36 +00:00
Anders Jonsson
99d89299fd Updated Swedish translation 2016-09-06 19:25:40 +00:00
Jonas Ådahl
f36fa53b0e clutter/stage: Offset framebuffer capture origin by view layout
The rectangle passed to capture_view() is in stage coordinate space;
thus, to translate to framebuffer coordinate space, the origin need to
be translated by the view layout position.

This fixes capturing views not at position (0, 0).

https://bugzilla.gnome.org/show_bug.cgi?id=770127
2016-09-06 14:59:36 +08:00
Olivier Fourdan
4f58a46217 wayland: add min/max size from xdg-shell v6
Implement min/max size request from xdg-shell-v6 and plug it into the
existing code so that windows with fixed size cannot be tiled/maximized
in Wayland just like in X11.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770226
2016-09-06 08:54:08 +02:00
Baurzhan Muftakhidinov
3acd562a41 Updated Kazakh translation 2016-09-04 04:41:19 +00:00
Changwoo Ryu
0515f73ff0 Updated Korean translation 2016-09-03 14:08:34 +00:00
Jonas Ådahl
d696fd3021 wayland: Don't handle input events after capability was removed
The seat capability updating is synchronous, but input events are
asynchronous (first queued then emitted). This means we may end up in a
situation where we from libinput first may receive a key event,
immediately followed by a device-removed event. Clutter will first
queue the key event, then remove the device, immediately triggering the
seat capability removal.

Later, when the clutter stage processes the queued events, the
previously queued key event will be processed, eventually making it
into MetaWaylandSeat. Before this patch, MetaWaylandSeat would still
forward the key event to MetaWaylandKeyboard, even though it had
'released' it. Doing this would cause referencing potentially freed
memory, such as the xkb state that was unreferenced when the seat
removed the capability.

In order to avoid processing these lingering events, for now, just drop
them on the floor if the capability has been removed.

Eventually, the event queuing etc needs to be redesigned to work better
when used in a Wayland compositor, but for now at least don't access
freed memory.

https://bugzilla.gnome.org/show_bug.cgi?id=770727
2016-09-02 21:11:08 +08:00
Jonas Ådahl
ce7573e2b7 cogl/egl: Fix non-Wayland build
Use #ifdef instead of #if, otherwise it won't compile when Wayland is
not available.

https://bugzilla.gnome.org/show_bug.cgi?id=770647
2016-09-02 17:04:11 +08:00
Jonas Ådahl
6c8f6afdc4 window: Fix focus of unmappable modal transient's parent
When a modal transient is unmanaging, most likely the parent of the
modal transient should be focused.

In Wayland, a MetaWindow is created when a shell surface role (like
xdg_toplevel) is created, but a window cannot be shown until a buffer
is attached. If a client would create two modal transients and make
them both have the same parent, but only one get a buffer attached
(i.e. shown), when unmanaging the modal transient that was showing,
when finding a new focus candidate, the stacking code will ignore the
not-to-be-shown buffer-less modal transient when finding a good
candidate for focusing. In the case described here, this means it will
find the parent of the unmanaging modal transient.

This newly chosen candidate will then be passed to meta_window_focus();
meta_window_focus() will then try to find any modal transient to focus
instead, will find the one without any buffer, then fail to focus it
because it cannot be mapped, thus making meta_window_focus() not focus
anything. Since meta_window_focus() didn't change any focus state, the
assert in meta_window_unmanage() checking that the unmanaging window
isn't focused anymore will be hit, causing mutter to abort.

For now, fix this by checking whether the modal transient can actually
be focused in meta_window_focus(). For X11 client windows, a window
will be defined to be focusable always, but for Wayland client windows,
a window will be determined focusable only if it has a buffer attached.

In the future, we should probably do a more thorough refactorization of
focus handling to get rid of any X11 - Wayland differences.

https://bugzilla.gnome.org/show_bug.cgi?id=757568
2016-09-01 21:09:10 +08:00
Jonas Ådahl
7a096b8686 wayland/cursor-role: Add back priv variable
Rebase of previous patch that removed the priv variable shouldn't have,
since it was now used by other things. Add it back so it compiles again.
2016-09-01 21:04:13 +08:00
Jonas Ådahl
c7976e0dbc wayland/cursor-role: Increase buffer use count on construction
We may be assigned multiple times, if the surface is assigned to be a
cursor surface multiple times. Each time e.g. wl_pointer.set_cursor is
called, we'll be assigned.

While the role object exists, we'll handle buffer use count even when
we are not actively assigned, thus we should only handle the initial
assignment use count bump when constructing, so that we don't increase
it when reassigned, where the wl_resource may already have been
released.

https://bugzilla.gnome.org/show_bug.cgi?id=770402
2016-09-01 19:39:53 +08:00
Rui Matos
f692c527e7 surface-role-cursor: Send frame callbacks for backend handled cursors
For backend handled cursors, if nothing else changes on the clutter
stage, we end up not sending out frame callbacks since clutter doesn't
draw a new frame.

To fix this, we'll keep cursor surfaces' frame callbacks separate from
other surfaces' and trigger them from the new
MetaCursorRenderer::cursor-painted signal which handles both software
and hardware cursors.

https://bugzilla.gnome.org/show_bug.cgi?id=749913
2016-08-31 20:10:43 +02:00
Rui Matos
2c1d3e5b70 cursor-renderer: Add a cursor painted signal
This signal allows interested parties to be notified of a new cursor
frame being painted regardless of whether it's being painted by the
backend directly or if it's a software rendered cursor frame handled
by clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=749913
2016-08-31 20:10:14 +02:00
Jonas Ådahl
262e184fe7 Default to using stage views
Instead of hiding stage views enablement behind MUTTER_STAGE_VIEWS=1,
default to enable it, while making it possible to disable using
MUTTER_STAGE_VIEWS=0 instead.

https://bugzilla.gnome.org/show_bug.cgi?id=770366
2016-08-30 22:56:56 +08:00