1
0
Fork 0
Commit graph

21968 commits

Author SHA1 Message Date
Jonas Ådahl
c0c132a320 wayland/xdg-popup: Always use monitor of toplevel
Always use the monitor of the toplevel surface's window, so that the
popup menu and the parent will always have the same scale. This fixes
the dimensions sent in the xdg_popup configure event.

https://bugzilla.gnome.org/show_bug.cgi?id=771841
2016-10-13 13:57:54 +08:00
Jonas Ådahl
0dfb5d3ef7 wayland/touch: Use surface relative coordinate helper
Use the global to surface local coordinate converter helper, as that
will currently convert coordinates for Xwayland client more correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=768039
2016-10-13 13:57:54 +08:00
Jonas Ådahl
6480a7ee4a wayland/pointer-constraints: Don't include window frame in region
When Xwayland confines, the surface dimensions will include the server
side window manager decorations. We don't want the decorations to be
included in the constraint region so intersect the calculated input
region with the parts of the buffer rect that is not part of the window
frame.

https://bugzilla.gnome.org/show_bug.cgi?id=771859
2016-10-13 12:59:41 +08:00
Jonas Ådahl
6cc8450f8e wayland/pointer-constraints: Unify requirements for enablement
Put the conditions for enabling a pointer constraint in a helper
function, and use that in both maybe_enable() and maybe_remove(). The
constraint region checking is still only done in maybe_enable()
however.

This changes the conditions for maybe disabling the constraint on focus
change and other trigger points, namely it makes constraints by Xwayland
not disable when they shouldn't due to the constraining window being an
override-redirect window.

https://bugzilla.gnome.org/show_bug.cgi?id=771859
2016-10-13 12:59:41 +08:00
Jonas Ådahl
7ae4b28bda wayland/pointer-constraints: Disable or remove when grab is cancelled
When the grab is cancelled, for example because of an Alt-tab, VT
switch etc, disable or remove (depending on the constraint type) the
constraint. This avoids a re-entry issue when the focus is returned and
the focus listener tries to re-enable a disabled constraint.

https://bugzilla.gnome.org/show_bug.cgi?id=771859
2016-10-13 12:59:41 +08:00
Theppitak Karoonboonyanan
bb8e6afae6 Fix typo in Thai translation 2016-10-13 11:22:35 +07:00
Olivier Fourdan
d7f61e48ac wayland: apply size hints after placing the window
Otherwise the window will be shown initially in the wrong position then
moved quickly as soon as it's made visible, which is confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=772729
2016-10-12 10:16:13 +02:00
Jonas Ådahl
9de6de5802 MetaWaylandPopup: Dismiss popup when grab is cancelled
Dismiss the popup when the grab is cancelled, so that if the grab is
ended for whatever reason (such as VT switching or the last pointer
being disconnected), it doesn't try to end the grab when it isn't
active.

This fixes a crash when VT switching back and forth while a popup grab
is active.

https://bugzilla.gnome.org/show_bug.cgi?id=771858
2016-10-12 10:08:59 +08:00
Jonas Ådahl
6e7057426e wayland/pointer: Add way to cancel current grab
Previously a grab could suddenly end without the grabber knowing
anything about it. Some grabs assume they won't suddenly end without
notice, and can use then new 'cancel' vfunc to be notified.

Currently a grab is cancelled when a new one is started (i.e. in
meta_wayland_pointer_grab_start()), when a non-popup compositor wide
event route is initiated, and when the seat looses the pointer
capability.

https://bugzilla.gnome.org/show_bug.cgi?id=771858
2016-10-12 10:08:59 +08:00
Jonas Ådahl
5306d36522 wayland/touch: Use helper for getting the next event serial
https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
7990182f56 wayland/pointer: Use grab helper that doesn't focus when disabling
Instead of using meta_wayland_pointer_end_grab() which focuses the new
grab, add a new helper mean to be used to reset the grab state without
changing the pointer focus. When using this function, the call site is
supposed to explicitly manage focus.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
93a6be08a5 wayland/pointer: Naming and coding style fixes
Some very long lines that stood out were shortened, and an old naming
convention from weston was removed.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
d5d5084151 wayland/pointer: Check pointer presence at set focus call site
Make the caller of focus setting check whether there is a pointer to
update the focus state of. It makes it more obvious what to expect, as
the call would be a no-op in when no pointer is present.

Grabbing is still allowed without the presence of a pointer because it
is used by popups even on touch-only systems.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
d3cff9a962 wayland/pointer: Use helper for getting the next event serial
Use the MetaWaylandInputDevice helper for serial retrieval.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
133bbdfefa wayland/keyboard: Check keyboard presence at set focus call site
Make the caller of focus setting and grab starting check whether there
is a keyboard to update the focus state or start grabbing. It makes it
more obvious what to expect, as the call would be a no-op in when no
keyboard is present.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
a8c3470cf2 wayland/seat: Use seat capability checking helper
https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
578e527869 wayland/keyboard: Cleanup resource list management
Initialize on init(), unlink and reinitialize the list headers on
disable() so that any delayed resource destruction doesn't affect future
state.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
312f215fc3 wayland/keyboard: Cleanup grab state managing
Initialize on init() and just end grab on disable().

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
d639c28e3b wayland/keyboard: Cleanup xkb state managing
Initialize and cleanup properly in a _init()/_destroy() function pair.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
c3f7259cbb wayland/keyboard: Initialize static state in GObject init func
https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
56e8f98c13 wayland/keyboard: Naming and coding style fixes
Some very long lines that stood out were shortened, and an old naming
convention from weston was removed.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
c2217373df wayland/keyboard: Scope variable correctly
https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:54 +08:00
Jonas Ådahl
4a3781d7db wayland/keyboard: Stop using temporary wl_list 'l'
The variable name 'l' usually refers to a GList iterator, but here it's
just a short hand for a specific list. Stop using this shorthand, since
it just makes it harder to read what list is used.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:53 +08:00
Jonas Ådahl
911a838c3a wayland/keyboard: Simplify getting the serial serial
Use the MetaWaylandInputDevice helper for getting the next event serial
number.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:53 +08:00
Jonas Ådahl
c6106f90d4 wayland/input-device: Add next serial helper
Add a helper function for getting the next input device serial number.
Will be used by keyboard, pointer and touch devices.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-11 22:51:50 +08:00
Landry MINOZA
ed52e17886 delete: Swap wait/force-quit actions
The order doesn't only affect the visual layout, but also which action
cancels the dialog (and therefore responds to Escape). It is completely
surprising that this triggers a destructive action like force-quit, so
swap the actions to wait when the dialog is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=737109
2016-10-11 00:54:25 +02:00
Florian Müllner
f63bb024fa Bump version to 3.22.1
Update NEWS.
2016-10-11 00:34:34 +02:00
Florian Müllner
bccff5bdd8 window: Expose Flatpak application ID
GNOME Shell's window matching currently fails frequently with Flatpak
applications, as one of the primary hints used to link windows with
.desktop files - the WM_CLASS - no longer matches when flatpak renames
the exported .desktop file. Luckily, Flatpak provides us with a fail-safe
way to map from the PID to the corresponding application ID, so expose an
appropriate method that allows GNOME Shell to reliably match windows to
the corresponding Flatpak app.

https://bugzilla.gnome.org/show_bug.cgi?id=772614
2016-10-10 23:35:02 +02:00
Florian Müllner
e9944350d3 delete: Share some code between X11 and wayland
In order to kill a window, on both X11 and wayland we first try to
kill(3) the corresponding process, so we can add the newly added
get_client_pid() method to share that code.

https://bugzilla.gnome.org/show_bug.cgi?id=772613
2016-10-10 23:35:02 +02:00
Florian Müllner
1fab6e69b7 window: Add get_client_pid() method
It is often useful to identify the client process that created
a particular window, however the existing meta_window_get_pid()
method relies on _NET_WM_PID, which is only available on X11 and
depends on applications to set it correctly (which may not even
be possible when the app runs in its own PID namespace as Flatpak
apps do). So add a get_client_pid() method that uses windowing
system facilities to resolve the PID associated with a particular
window.

https://bugzilla.gnome.org/show_bug.cgi?id=772613
2016-10-10 23:35:01 +02:00
Jonas Ådahl
f89162ee73 wayland/pointer: Unset pointer focus when disabled
Previously the focus was reset implicitly by a memset() on the whole
MetaWaylandPointer struct. When MetaWaylandPointer was turned into a
GObject, this was not possible any more, and the focus was not updated
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=771646
2016-10-10 23:35:01 +02:00
Rui Matos
5261638bfd meta-monitor-config: Look at an output's modes directly when assigning
Going through the global mode pool and then checking if the mode is
available for a given output is pointless work since we can look at
the output's available modes directly.

This implicitly changes how we choose the default mode since, instead
of relying on the sort order of the global modes array, we now rely on
the sort order of the output modes array. Still not ideal, but at
least it makes more sense since the global array is essentially
unsorted.

https://bugzilla.gnome.org/show_bug.cgi?id=772176
2016-10-10 22:37:13 +02:00
Rui Matos
04b75c45f8 MetaMonitorManagerKms: stop taking drmModeModeInfo.vrefresh directly
As in the previous commit, this value already has mode flags baked in
and we can always get the value we need by computing it ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=772176
2016-10-10 22:37:11 +02:00
Rui Matos
a50950cf8f MetaMonitorManagerKms: stop accounting for mode flags in refresh rates
This isn't technically needed and, in fact, makes us default to
interlaced modes in some cases which isn't desirable.

Note that X doesn't account for these flags either for its mode
refresh rates.

https://bugzilla.gnome.org/show_bug.cgi?id=772176
2016-10-10 22:36:47 +02:00
Florian Müllner
f1850e0d61 monitor-manager-kms: Fix compiler warning
As the m format specifier doesn't consume any arguments, the number
of varargs currently doesn't match the number of specifiers; the
failed transform may be relevant, so include it in the message
instead of removing the excess argument.
2016-10-08 22:38:26 +02:00
Carlos Garnacho
e3dab70754 backends: Use fallback rotation if native DRM plane rotation failed
Blacklist the HW mode so we fallback gracefully to our own paths.

https://bugzilla.gnome.org/show_bug.cgi?id=772512
2016-10-07 17:19:46 +02:00
Carlos Garnacho
b3eac93c4c xwayland: Ignore selection request not meant to our internal window
There may be other windows managing selection whose events are seen in
our GDK event filter, like st-clipboard in gnome-shell, we should in
that case not interfere on Selection/SelectionRequest events that are
not meant for us.

This fixes an odd feedback loop where requesting clipboard contents from
wayland results in a XConvertRequest call and a SelectionRequest event
that is interpreted by mutter as a request from another X11 client, so
the current data source is poked for content, which happens to be the
X11 bridge, which does a XConvertRequest to get contents... This is only
broken after the many nested async operations create enough pipes and
cancellables to run out of fds.

Adding checks to ensure only events meant to our "selection owner"
window are managed prevent this unintended loop to happen in the first
place.

https://bugzilla.gnome.org/show_bug.cgi?id=760745
2016-10-07 16:05:22 +02:00
Milo Casagrande
a9e386e1af Updated Italian translation 2016-10-03 09:50:50 +00:00
Olav Vitters
028157081c Fix string format build error
backends/meta-input-settings.c:1245:27: error: format '%lx' expects
argument of type 'long unsigned int', but argument 3 has type 'guint64
{aka long long unsigned int}' [-Werror=format=]
2016-09-22 21:00:29 +02:00
Inaki Larranaga Murgoitio
a65c344743 Update Basque language 2016-09-19 13:44:45 +02:00
Florian Müllner
8797e5951c Bump version to 3.22.0
Update NEWS.
2016-09-19 23:15:04 +02:00
Florian Müllner
a4e69f338d clutter: Reuse GTK+'s RTL/LTR handling
Commit a4fb7ef5a3 dropped translations of our internal cogl/clutter
forks, which broke the local-based text direction support. Instead
of bringing back translations just for this purpose, we can re-use
GTK's translations which use the same technique.

https://bugzilla.gnome.org/show_bug.cgi?id=771549
2016-09-19 23:10:57 +02:00
Ask Hjorth Larsen
d045462860 Updated Danish translation 2016-09-19 22:59:52 +02:00
Carlos Garnacho
3137ddb1a1 backends: Handle tablet settings lookups with no backing libwacom info
Those will be unseen by g-s-d/g-c-c, so no settings will be written on
disk for those. Still, look up an ID correctly in this case instead of
crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=771628
2016-09-19 22:55:30 +02:00
Rui Matos
5fbb479301 clutter/stage: Fix framebuffer capture origin offset
Commit f36fa53b0e had the offset math
wrong and the reviewer didn't notice it.

https://bugzilla.gnome.org/show_bug.cgi?id=771502
2016-09-19 22:28:05 +02:00
David King
a4c10b6683 Update British English translation 2016-09-18 12:14:41 +02:00
Florian Müllner
9e5491439e window-actor: Make sync_visibility() public
When we mess with a window actor's visibility from the shell side
(yes, I know :-( ), we should at least restore the proper visibility
when we're done with it ...

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:01:15 +02:00
Jonas Ådahl
417757eab8 wayland: Handle parent-less popup commits
A xdg_popup, when active, always has a parent surface. However, a popup
created may immediately become invalid, for example when it is not
granted a grab, in which case it won't be assigned a parent since it
will never be mapped.

This case needs to be handled elsewhere, as one cannot assume a
MetaWaylandXdgPoup that is processed (via wl_surface commit handling
etc) will have a parent_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=771495
2016-09-18 10:58:38 +08:00
Tom Tryfonidis
32b87e7bea Updated Greek translation 2016-09-16 11:14:12 +00:00
Stas Solovey
ed6fda84e1 Updated Russian translation 2016-09-16 09:24:23 +00:00