Compare commits

...

20 Commits

Author SHA1 Message Date
7631ba5208 Bump version to 3.20.2
Update NEWS.
2016-05-10 22:15:58 +02:00
b31eddd208 Updated Portuguese translation 2016-04-30 15:15:52 +00:00
a6cc35e595 wayland: remove pressed button checks from meta_wayland_pointer_can_grab_surface()
Leave these checks up to the callers, the only uses of this function
(indirect, through meta_wayland_seat_get_grab_info) are
[wl_shell|xdg]_surface.move/resize/show_window_menu.

In move/resize it makes sense to check for a button being pressed, because
we must expect a button release event. However for xdg_surface.show_window_menu
we 1) don't strictly need further events and 2) we must account for press+release
event pairs being processed at once in the compositor before the client sees
the former.

That is eg. the case of touchpad 2nd/3rd button tap emulation, multifinger
taps will emit the event pair at once, so when the client manages to request
xdg_surface.show_window_menu, it'll be too late in the compositor side, so the
request is ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=764519
2016-04-25 14:23:01 +02:00
08ac192b9d wayland: Handle wl_data_device being destroyed while focused
A wl_data_device object may be created while it is being focused,
either because the client destroyed it or because the client was
destroyed. Handle this by early out in focus handler vfuncs the case
where it was destroyed, so that we don't corrupt memory and/or cause
segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=765062
2016-04-25 20:17:24 +08:00
ed5c3b39ee monitor-manager: Add get_is_builtin_display_on()
Wrap the existing laptop_display_is_on() method in a public function
that gnome-shell can use to query whether a builtin output is present
and enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 21:16:16 +02:00
b6f11fa8b8 monitor-config: Update laptop heuristics to match GnomeRROutput
gnome-desktop's GnomeRROutput class has heuristics to classify a display
as builtin similar to our own[0]. The two heuristics don't quite match
though, so different core components can end up with a different view
on the current display configuration. Minimize that risk by adding a
couple of rules that bring the two heuristics closer together.

[0] https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-rr.c#n1674

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 17:36:22 +02:00
ab6c008e3e monitor-manager: Expose output_is_laptop() method
We currently duplicate the heuristics of whether an output is considered
a laptop or not. Avoid this by sharing a small helper method.

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 17:36:22 +02:00
ff312b6958 fix warning due implicit declaration of function
error: implicit declaration of function
  .x = (int)roundf (priv->current_x - (hot_x * texture_scale)),
            ^

https://bugzilla.gnome.org/show_bug.cgi?id=765252
2016-04-20 09:22:52 +02:00
e284370013 wayland-keyboard: Notify clients of pending modifier state changes
If we get a key event but still have pending modifier state changes we
need to send a modifiers event right away so that the key event can be
interpreted by clients correctly modified.

This case could happen when mutter/gnome-shell itself consumes the
modifier key press event such as with the overview key which by
default is triggered on super press.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
0fa9751b31 wayland-keyboard: Include virtual modifiers along with real modifiers
The wayland protocol has enough space to send both virtual and real
modifiers on modifiers events which saves clients the work of
resolving virtual modifiers themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
82a247ccf5 keybindings: Keep virtual modifier masks around
Besides the resolved real modifier masks, having the virtual masks
around will be useful too.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
5d6af70bc9 keybindings: Fix keyboard move/resize on Wayland
Rework the code to keep the grab/ungrab logic when running as a Wayland
compositor.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=758076
2016-04-19 09:02:06 +02:00
5a58fc0621 Updated Japanese translation 2016-04-17 06:40:14 +00:00
8842bdfb11 Do not skip CoglError parameters
While CoglError is a define to GError, it doesn't follow the convention
of ignoring errors when NULL is passed, but rather treats the error as
fatal :-(
That's clearly unwanted for a compositor, so make sure to always pass
an error parameter where a runtime error is possible (i.e. any CoglError
that is not a malformed blend string).

https://bugzilla.gnome.org/show_bug.cgi?id=765058
2016-04-15 17:22:24 +02:00
bdc72dd9d7 Do not try to unref NULL CoglObjects
https://bugzilla.gnome.org/show_bug.cgi?id=765058
2016-04-15 17:21:22 +02:00
588b8a163b Bump version to 3.20.1
Update NEWS.
2016-04-13 19:02:41 +02:00
8587f0e80d monitor-config: Handle invalid previous configurations
The previous configuration might not apply because the number of
enabled outputs when trying to apply it might have changed. This isn't
a bug so we shouldn't assert. Instead, we can handle it by falling
back as we would if we didn't have a previous configuration to start
with.

https://bugzilla.gnome.org/show_bug.cgi?id=764286
2016-04-13 18:16:36 +02:00
150732a894 theme: set RTL/LTR flags on the style context
https://bugzilla.gnome.org/show_bug.cgi?id=764807
2016-04-09 10:03:27 -07:00
75e6029206 stack: Fix 32-bit issues
Since g_array_append_val isn't smart enough to do a proper upcast, we
have to do it manually, lest we get junk.

This fixes various RAISE_ABOVE: window not in stack: 0x8100c8003
warnings that appear on 32-bit systems.
2016-04-08 17:28:26 -07:00
e017148208 wayland: Make wayland move/resizes be constrained the same as X11
Just like we do for _NET_WM_MOVERESIZE messages on X11, consider
wayland client move/resizes as "frame actions" so that the same
constraints are applied to them, in particular the titlebar visibility
constraint.

https://bugzilla.gnome.org/show_bug.cgi?id=748819
2016-04-06 17:58:18 +02:00
28 changed files with 1625 additions and 1544 deletions

27
NEWS
View File

@ -1,3 +1,30 @@
3.20.2
======
* Notify clients of pending modifier state changes [Rui; #748526]
* Add get_is_builtin_display_on() method [Florian; #765267]
* Fix 2-finger titlebar taps on wayland [Carlos; #764519]
* Misc. bug fixes [Florian, Victor, Jonas; #765058, #765252, #765062]
Contributors:
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, Rui Matos, Florian Müllner,
Victor Toso
Translations:
GNOME Translation Robot [ja], Tiago Santos [pt]
3.20.1
======
* Constrain window move/resizes on wayland as on X11 [Rui; #748819]
* Don't crash with invalid previous monitor configurations [Rui; #764286]
* Misc. bug fixes and cleanups [Jonas, Cosimo; #762828, #764807]
Contributors:
Jonas Ådahl, Cosimo Cecchi, Rui Matos, Jasper St. Pierre
Translations:
Inaki Larranaga Murgoitio [eu], Reinout van Schouwen [nl], Fabio Tomat [fur],
Trần Ngọc Quân [vi]
3.20.0
======
* Fix crash when using visual bell [Jonas; #763858]

View File

@ -2,7 +2,7 @@ AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [20])
m4_define([mutter_micro_version], [0])
m4_define([mutter_micro_version], [2])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])

2682
po/ja.po

File diff suppressed because it is too large Load Diff

View File

@ -3,21 +3,22 @@
# Distributed under the same licence as the metacity package
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
# Pedro Albuquerque <palbuquerque73@openmailbox.com>, 2015.
# Tiago Santos <tiagofsantos81@sapo.pt>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: 3.10\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-06-07 22:51+0000\n"
"PO-Revision-Date: 2015-06-25 08:16+0100\n"
"Last-Translator: Pedro Albuquerque <palbuquerque73@openmailbox.com>\n"
"POT-Creation-Date: 2016-04-30 13:15+0000\n"
"PO-Revision-Date: 2016-04-30 16:12+0100\n"
"Last-Translator: Tiago Santos <tiagofsantos81@sapo.pt>\n"
"Language-Team: Português <palbuquerque73@openmailbox.com>\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 2.91.6\n"
"X-Generator: Poedit 1.5.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../data/50-mutter-navigation.xml.in.h:1
@ -41,7 +42,6 @@ msgid "Move window to workspace 4"
msgstr "Mover janela para a área de trabalho 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#| msgid "Move window to workspace 1"
msgid "Move window to last workspace"
msgstr "Mover janela para a última área de trabalho"
@ -82,7 +82,6 @@ msgid "Switch applications"
msgstr "Mudar de aplicações"
#: ../data/50-mutter-navigation.xml.in.h:16
#| msgid "Switch applications"
msgid "Switch to previous application"
msgstr "Mudar para a aplicação anterior"
@ -91,7 +90,6 @@ msgid "Switch windows"
msgstr "Mudar de janelas"
#: ../data/50-mutter-navigation.xml.in.h:18
#| msgid "Switch windows"
msgid "Switch to previous window"
msgstr "Mudar para a janela anterior"
@ -100,7 +98,6 @@ msgid "Switch windows of an application"
msgstr "Alternar entre janelas de uma aplicação"
#: ../data/50-mutter-navigation.xml.in.h:20
#| msgid "Switch windows of an application"
msgid "Switch to previous window of an application"
msgstr "Mudar para a janela anterior de uma aplicação"
@ -109,7 +106,6 @@ msgid "Switch system controls"
msgstr "Alternar entre controlos de sistema"
#: ../data/50-mutter-navigation.xml.in.h:22
#| msgid "Switch system controls"
msgid "Switch to previous system control"
msgstr "Mudar para o controlo de sistema anterior"
@ -126,7 +122,6 @@ msgid "Switch windows of an app directly"
msgstr "Alternar diretamente entre janelas de uma aplicação"
#: ../data/50-mutter-navigation.xml.in.h:26
#| msgid "Switch windows of an application"
msgid "Switch directly to previous window of an app"
msgstr "Mudar diretamente para a janela anterior de uma aplicação"
@ -135,7 +130,6 @@ msgid "Switch system controls directly"
msgstr "Alternar diretamente entre controlos de sistema"
#: ../data/50-mutter-navigation.xml.in.h:28
#| msgid "Switch system controls"
msgid "Switch directly to previous system control"
msgstr "Mudar diretamente para o controlo de sistema anterior"
@ -160,7 +154,6 @@ msgid "Switch to workspace 4"
msgstr "Mudar para a área de trabalho 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#| msgid "Switch to workspace 1"
msgid "Switch to last workspace"
msgstr "Mudar para a última área de trabalho 1"
@ -415,81 +408,69 @@ msgid "Cancel tab popup"
msgstr "Cancelar o popup de tabulador"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#| msgid "Switch to workspace 1"
msgid "Switch to VT 1"
msgstr "Alternar para a área de trabalho 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#| msgid "Switch to workspace 2"
msgid "Switch to VT 2"
msgstr "Alternar para a área de trabalho 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#| msgid "Switch to workspace 3"
msgid "Switch to VT 3"
msgstr "Alternar para a área de trabalho 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#| msgid "Switch to workspace 4"
msgid "Switch to VT 4"
msgstr "Alternar para a área de trabalho 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#| msgid "Switch to workspace 5"
msgid "Switch to VT 5"
msgstr "Mover para a área de trabalho 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#| msgid "Switch to workspace 6"
msgid "Switch to VT 6"
msgstr "Mover para a área de trabalho 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#| msgid "Switch to workspace 7"
msgid "Switch to VT 7"
msgstr "Mover para a área de trabalho 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#| msgid "Switch to workspace 8"
msgid "Switch to VT 8"
msgstr "Mover para a área de trabalho 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#| msgid "Switch to workspace 9"
msgid "Switch to VT 9"
msgstr "Mover para a área de trabalho 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#| msgid "Switch to workspace 10"
msgid "Switch to VT 10"
msgstr "Mover para a área de trabalho 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#| msgid "Switch to workspace 11"
msgid "Switch to VT 11"
msgstr "Mover para a área de trabalho 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#| msgid "Switch to workspace 12"
msgid "Switch to VT 12"
msgstr "Mover para a área de trabalho 12"
#: ../src/backends/meta-monitor-manager.c:496
#: ../src/backends/meta-monitor-manager.c:515
msgid "Built-in display"
msgstr "Ecrã embutido"
#: ../src/backends/meta-monitor-manager.c:522
#: ../src/backends/meta-monitor-manager.c:538
msgid "Unknown"
msgstr "Desconhecido"
#: ../src/backends/meta-monitor-manager.c:524
#: ../src/backends/meta-monitor-manager.c:540
msgid "Unknown Display"
msgstr "Ecrã desconhecido"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:532
#: ../src/backends/meta-monitor-manager.c:548
#, c-format
msgid "%s %s"
msgstr "%s %s"
@ -505,7 +486,7 @@ msgstr ""
"Já se encontra em execução outro gestor de janelas no ecrã %i do monitor \"%s"
"\"."
#: ../src/core/bell.c:185
#: ../src/core/bell.c:194
msgid "Bell event"
msgstr "Evento de campainha"
@ -534,40 +515,45 @@ msgstr "_Aguardar"
msgid "_Force Quit"
msgstr "_Forçar terminar"
#: ../src/core/display.c:563
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Falha ao abrir ecrã \"%s\" do sistema Janelas X\n"
#: ../src/core/main.c:176
#: ../src/core/main.c:181
msgid "Disable connection to session manager"
msgstr "Desativar a ligação ao gestor de sessão"
#: ../src/core/main.c:182
#: ../src/core/main.c:187
msgid "Replace the running window manager"
msgstr "Substituir o gestor de janelas em execução"
#: ../src/core/main.c:188
#: ../src/core/main.c:193
msgid "Specify session management ID"
msgstr "Especificar a ID de gestão de sessão"
#: ../src/core/main.c:193
#: ../src/core/main.c:198
msgid "X Display to use"
msgstr "Ecrã X a utilizar"
#: ../src/core/main.c:199
#: ../src/core/main.c:204
msgid "Initialize session from savefile"
msgstr "Inicializar a sessão a partir de um ficheiro de gravação de sessão"
#: ../src/core/main.c:205
#: ../src/core/main.c:210
msgid "Make X calls synchronous"
msgstr "Fazer as chamadas X sincronamente"
#: ../src/core/main.c:212
#: ../src/core/main.c:217
msgid "Run as a wayland compositor"
msgstr "Executar como compositor wayland"
#: ../src/core/main.c:220
#: ../src/core/main.c:223
#| msgid "Run as a wayland compositor"
msgid "Run as a nested compositor"
msgstr "Executar como compositor aninhado"
#: ../src/core/main.c:231
msgid "Run as a full display server, rather than nested"
msgstr "Executar como servidor de ecrã completo, em vez de aninhado"
@ -595,16 +581,13 @@ msgstr "Imprimir a versão"
msgid "Mutter plugin to use"
msgstr "Extensão Mutter a utilizar"
#: ../src/core/prefs.c:2004
#: ../src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Área de trabalho %d"
#: ../src/core/screen.c:525
#: ../src/core/screen.c:521
#, c-format
#| msgid ""
#| "Screen %d on display \"%s\" already has a window manager; try using the --"
#| "replace option to replace the current window manager.\n"
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
@ -612,12 +595,12 @@ msgstr ""
"O ecrã \"%s\" já tem um gestor de janelas; tente utilizar a opção --replace "
"para substituir o gestor de janelas atual."
#: ../src/core/screen.c:607
#: ../src/core/screen.c:603
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Ecrã %d no monitor \"%s\" é inválido\n"
#: ../src/core/util.c:118
#: ../src/core/util.c:121
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "O Mutter foi compilado sem suporte para modo verboso\n"

View File

@ -28,6 +28,7 @@
#include <meta/meta-backend.h>
#include <meta/util.h>
#include <math.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>

View File

@ -198,6 +198,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
guint8 *cursor_data;
gboolean free_cursor_data;
CoglContext *ctx;
CoglError *error = NULL;
if (tracker->xfixes_cursor)
return;
@ -239,11 +240,17 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
CLUTTER_CAIRO_FORMAT_ARGB32,
cursor_image->width * 4, /* stride */
cursor_data,
NULL);
&error);
if (free_cursor_data)
g_free (cursor_data);
if (error != NULL)
{
meta_warning ("Failed to allocate cursor sprite texture: %s\n", error->message);
cogl_error_free (error);
}
if (sprite != NULL)
{
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();

View File

@ -136,6 +136,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
ClutterBackend *clutter_backend;
CoglContext *cogl_context;
CoglTexture *texture;
CoglError *error = NULL;
g_assert (self->texture == NULL);
@ -156,10 +157,19 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
cogl_format,
rowstride,
(uint8_t *) xc_image->pixels,
NULL);
&error);
if (error)
{
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
cogl_error_free (error);
}
meta_cursor_sprite_set_texture (self, texture,
xc_image->xhot, xc_image->yhot);
cogl_object_unref (texture);
if (texture)
cogl_object_unref (texture);
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
}

View File

@ -913,23 +913,13 @@ key_is_laptop (MetaOutputKey *key)
{
/* FIXME: extend with better heuristics */
return g_str_has_prefix (key->connector, "LVDS") ||
g_str_has_prefix (key->connector, "lvds") ||
g_str_has_prefix (key->connector, "Lvds") ||
g_str_has_prefix (key->connector, "LCD") || /* some versions of fglrx, sigh */
g_str_has_prefix (key->connector, "DSI") ||
g_str_has_prefix (key->connector, "eDP");
}
static gboolean
output_is_laptop (MetaOutput *output)
{
/* FIXME: extend with better heuristics */
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
return TRUE;
default:
return FALSE;
}
}
static gboolean
laptop_display_is_on (MetaConfiguration *config)
{
@ -1051,6 +1041,17 @@ apply_configuration_with_lid (MetaMonitorConfig *self,
return apply_configuration (self, config, manager);
}
gboolean
meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *self)
{
g_return_val_if_fail (META_IS_MONITOR_CONFIG (self), FALSE);
if (self->current)
return laptop_display_is_on (self->current);
return FALSE;
}
gboolean
meta_monitor_config_apply_stored (MetaMonitorConfig *self,
MetaMonitorManager *manager)
@ -1092,7 +1093,7 @@ find_primary_output (MetaOutput *outputs,
for (i = 0; i < n_outputs; i++)
{
if (output_is_laptop (&outputs[i]))
if (meta_output_is_laptop (&outputs[i]))
return i;
}
@ -1554,18 +1555,19 @@ meta_monitor_config_restore_previous (MetaMonitorConfig *self,
/* The user chose to restore the previous configuration. In this
* case, restore the previous configuration. */
MetaConfiguration *prev_config = config_ref (self->previous);
apply_configuration (self, prev_config, manager);
gboolean ok = apply_configuration (self, prev_config, manager);
config_unref (prev_config);
/* After this, self->previous contains the rejected configuration.
* Since it was rejected, nuke it. */
g_clear_pointer (&self->previous, (GDestroyNotify) config_unref);
if (ok)
return;
}
else
{
if (!meta_monitor_config_apply_stored (self, manager))
meta_monitor_config_make_default (self, manager);
}
if (!meta_monitor_config_apply_stored (self, manager))
meta_monitor_config_make_default (self, manager);
}
static void
@ -2029,7 +2031,11 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
all_outputs = meta_monitor_manager_get_outputs (manager,
&n_outputs);
g_assert (n_outputs == config->n_outputs);
if (n_outputs != config->n_outputs)
{
g_hash_table_destroy (assignment.info);
return FALSE;
}
for (i = 0; i < n_outputs; i++)
{

View File

@ -49,4 +49,6 @@ void meta_monitor_config_make_persistent (MetaMonitorConfig *confi
void meta_monitor_config_restore_previous (MetaMonitorConfig *config,
MetaMonitorManager *manager);
gboolean meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *config);
#endif /* META_MONITOR_CONFIG_H */

View File

@ -398,6 +398,7 @@ void meta_monitor_manager_confirm_configuration (MetaMonitorManag
void meta_output_parse_edid (MetaOutput *output,
GBytes *edid);
gboolean meta_output_is_laptop (MetaOutput *output);
void meta_crtc_info_free (MetaCRTCInfo *info);
void meta_output_info_free (MetaOutputInfo *info);

View File

@ -511,14 +511,8 @@ make_display_name (MetaMonitorManager *manager,
g_autofree char *inches = NULL;
g_autofree char *vendor_name = NULL;
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_eDP:
if (meta_output_is_laptop (output))
return g_strdup (_("Built-in display"));
default:
break;
}
if (output->width_mm > 0 && output->height_mm > 0)
{
@ -1464,6 +1458,21 @@ meta_output_parse_edid (MetaOutput *meta_output,
meta_output->serial = g_strdup ("unknown");
}
gboolean
meta_output_is_laptop (MetaOutput *output)
{
/* FIXME: extend with better heuristics */
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_DSI:
return TRUE;
default:
return FALSE;
}
}
void
meta_monitor_manager_on_hotplug (MetaMonitorManager *manager)
{
@ -1590,3 +1599,11 @@ meta_monitor_manager_get_monitor_at_point (MetaMonitorManager *manager,
return -1;
}
gboolean
meta_monitor_manager_get_is_builtin_display_on (MetaMonitorManager *manager)
{
g_return_val_if_fail (META_IS_MONITOR_MANAGER (manager), FALSE);
return meta_monitor_config_get_is_builtin_display_on (manager->config);
}

View File

@ -152,6 +152,7 @@ file_loaded (GObject *source_object,
{
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
GError *error = NULL;
CoglError *catch_error = NULL;
GTask *task;
CoglTexture *texture;
GdkPixbuf *pixbuf;
@ -186,9 +187,10 @@ file_loaded (GObject *source_object,
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
row_stride,
pixels, 0,
NULL))
&catch_error))
{
g_warning ("Failed to create texture for background");
cogl_error_free (catch_error);
cogl_object_unref (texture);
}

View File

@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <meta/util.h>
#include <meta/meta-background.h>
#include <meta/meta-background-image.h>
#include "meta-background-private.h"
@ -542,6 +543,7 @@ ensure_color_texture (MetaBackground *self)
{
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglError *error = NULL;
uint8_t pixels[6];
int width, height;
@ -582,7 +584,13 @@ ensure_color_texture (MetaBackground *self)
COGL_PIXEL_FORMAT_RGB_888,
width * 3,
pixels,
NULL));
&error));
if (error != NULL)
{
meta_warning ("Failed to allocate color texture: %s\n", error->message);
cogl_error_free (error);
}
}
}

View File

@ -27,6 +27,7 @@
#include <string.h>
#include <meta/meta-shadow-factory.h>
#include <meta/util.h>
#include "cogl-utils.h"
#include "region-utils.h"
@ -707,6 +708,7 @@ make_shadow (MetaShadow *shadow,
{
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglError *error = NULL;
int d = get_box_filter_size (shadow->key.radius);
int spread = get_shadow_spread (shadow->key.radius);
cairo_rectangle_int_t extents;
@ -804,7 +806,13 @@ make_shadow (MetaShadow *shadow,
(buffer +
(y_offset - shadow->outer_border_top) * buffer_width +
(x_offset - shadow->outer_border_left)),
NULL));
&error));
if (error)
{
meta_warning ("Failed to allocate shadow texture: %s\n", error->message);
cogl_error_free (error);
}
cairo_region_destroy (row_convolve_region);
cairo_region_destroy (column_convolve_region);

View File

@ -102,8 +102,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
priv->pixmap = None;
meta_error_trap_pop (display);
cogl_object_unref (priv->texture);
priv->texture = NULL;
g_clear_pointer (&priv->texture, cogl_object_unref);
}
static void
@ -114,14 +113,20 @@ set_pixmap (MetaSurfaceActorX11 *self,
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
CoglError *error = NULL;
CoglTexture *texture;
g_assert (priv->pixmap == None);
priv->pixmap = pixmap;
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, NULL));
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, &error));
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
if (error != NULL)
{
g_warning ("Failed to allocate stex texture: %s", error->message);
cogl_error_free (error);
}
else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
g_warning ("NOTE: Not using GLX TFP!\n");
priv->texture = texture;

View File

@ -1752,9 +1752,17 @@ build_and_scan_frame_mask (MetaWindowActor *self,
}
else
{
CoglError *error = NULL;
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
COGL_PIXEL_FORMAT_A_8,
stride, mask_data, NULL));
stride, mask_data, &error));
if (error)
{
g_warning ("Failed to allocate mask texture: %s", error->message);
cogl_error_free (error);
}
}
meta_shaped_texture_set_mask_texture (stex, mask_texture);

View File

@ -94,8 +94,11 @@ typedef struct
GHashTable *key_bindings_index;
xkb_mod_mask_t ignored_modifier_mask;
xkb_mod_mask_t hyper_mask;
xkb_mod_mask_t virtual_hyper_mask;
xkb_mod_mask_t super_mask;
xkb_mod_mask_t virtual_super_mask;
xkb_mod_mask_t meta_mask;
xkb_mod_mask_t virtual_meta_mask;
MetaKeyCombo overlay_key_combo;
MetaResolvedKeyCombo overlay_resolved_key_combo;
gboolean overlay_key_only_pressed;

View File

@ -185,16 +185,18 @@ reload_modmap (MetaKeyBindingManager *keys)
struct xkb_keymap *keymap = meta_backend_get_keymap (backend);
struct xkb_state *scratch_state;
xkb_mod_mask_t scroll_lock_mask;
xkb_mod_mask_t dummy_mask;
/* Modifiers to find. */
struct {
const char *name;
xkb_mod_mask_t *mask_p;
xkb_mod_mask_t *virtual_mask_p;
} mods[] = {
{ "ScrollLock", &scroll_lock_mask },
{ "Meta", &keys->meta_mask },
{ "Hyper", &keys->hyper_mask },
{ "Super", &keys->super_mask },
{ "ScrollLock", &scroll_lock_mask, &dummy_mask },
{ "Meta", &keys->meta_mask, &keys->virtual_meta_mask },
{ "Hyper", &keys->hyper_mask, &keys->virtual_hyper_mask },
{ "Super", &keys->super_mask, &keys->virtual_super_mask },
};
scratch_state = xkb_state_new (keymap);
@ -203,6 +205,7 @@ reload_modmap (MetaKeyBindingManager *keys)
for (i = 0; i < G_N_ELEMENTS (mods); i++)
{
xkb_mod_mask_t *mask_p = mods[i].mask_p;
xkb_mod_mask_t *virtual_mask_p = mods[i].virtual_mask_p;
xkb_mod_index_t idx = xkb_keymap_mod_get_index (keymap, mods[i].name);
if (idx != XKB_MOD_INVALID)
@ -210,9 +213,13 @@ reload_modmap (MetaKeyBindingManager *keys)
xkb_mod_mask_t vmodmask = (1 << idx);
xkb_state_update_mask (scratch_state, vmodmask, 0, 0, 0, 0, 0);
*mask_p = xkb_state_serialize_mods (scratch_state, XKB_STATE_MODS_DEPRESSED) & ~vmodmask;
*virtual_mask_p = vmodmask;
}
else
*mask_p = 0;
{
*mask_p = 0;
*virtual_mask_p = 0;
}
}
xkb_state_unref (scratch_state);
@ -897,6 +904,9 @@ meta_change_button_grab (MetaKeyBindingManager *keys,
int button,
int modmask)
{
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@ -969,9 +979,6 @@ meta_display_grab_window_buttons (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
/* Grab Alt + button1 for moving window.
* Grab Alt + button2 for resizing window.
* Grab Alt + button3 for popping up window menu.
@ -1008,9 +1015,6 @@ meta_display_ungrab_window_buttons (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
if (keys->window_grab_modifiers == 0)
return;
@ -1037,9 +1041,6 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
/* Grab button 1 for activating unfocused windows */
meta_verbose ("Grabbing unfocused window buttons for %s\n", window->desc);
@ -1079,9 +1080,6 @@ meta_display_ungrab_focus_window_button (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
meta_verbose ("Ungrabbing unfocused window buttons for %s\n", window->desc);
if (!window->have_focus_click_grab)
@ -1161,6 +1159,9 @@ meta_change_keygrab (MetaKeyBindingManager *keys,
XISetMask (mask.mask, XI_KeyPress);
XISetMask (mask.mask, XI_KeyRelease);
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@ -1275,11 +1276,6 @@ meta_screen_change_keygrabs (MetaScreen *screen,
void
meta_screen_grab_keys (MetaScreen *screen)
{
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return;
if (screen->keys_grabbed)
return;
@ -1313,10 +1309,6 @@ meta_window_grab_keys (MetaWindow *window)
MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager;
/* Under Wayland, we don't need to grab at all. */
if (meta_is_wayland_compositor ())
return;
if (window->all_keys_grabbed)
return;
@ -1384,7 +1376,6 @@ guint
meta_display_grab_accelerator (MetaDisplay *display,
const char *accelerator)
{
MetaBackend *backend = meta_get_backend ();
MetaKeyBindingManager *keys = &display->key_binding_manager;
MetaKeyBinding *binding;
MetaKeyGrab *grab;
@ -1408,8 +1399,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
if (get_keybinding (keys, &resolved_combo))
return META_KEYBINDING_ACTION_NONE;
if (META_IS_BACKEND_X11 (backend))
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
grab = g_new0 (MetaKeyGrab, 1);
grab->action = next_dynamic_keybinding_action ();
@ -1434,7 +1424,6 @@ gboolean
meta_display_ungrab_accelerator (MetaDisplay *display,
guint action)
{
MetaBackend *backend = meta_get_backend ();
MetaKeyBindingManager *keys = &display->key_binding_manager;
MetaKeyBinding *binding;
MetaKeyGrab *grab;
@ -1454,8 +1443,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
{
guint32 index_key;
if (META_IS_BACKEND_X11 (backend))
meta_change_keygrab (keys, display->screen->xroot, FALSE, &binding->resolved_combo);
meta_change_keygrab (keys, display->screen->xroot, FALSE, &binding->resolved_combo);
index_key = key_combo_key (&binding->resolved_combo);
g_hash_table_remove (keys->key_bindings_index, GINT_TO_POINTER (index_key));
@ -1482,6 +1470,9 @@ grab_keyboard (Window xwindow,
XISetMask (mask.mask, XI_KeyPress);
XISetMask (mask.mask, XI_KeyRelease);
if (meta_is_wayland_compositor ())
return TRUE;
/* Grab the keyboard, so we get key releases and all key
* presses
*/
@ -1513,6 +1504,9 @@ grab_keyboard (Window xwindow,
static void
ungrab_keyboard (guint32 timestamp)
{
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@ -1525,10 +1519,6 @@ meta_window_grab_all_keys (MetaWindow *window,
{
Window grabwindow;
gboolean retval;
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return TRUE;
if (window->all_keys_grabbed)
return FALSE;
@ -1590,11 +1580,6 @@ meta_display_freeze_keyboard (MetaDisplay *display, guint32 timestamp)
void
meta_display_ungrab_keyboard (MetaDisplay *display, guint32 timestamp)
{
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return;
ungrab_keyboard (timestamp);
}

View File

@ -1061,7 +1061,7 @@ stack_sync_to_xserver (MetaStack *stack)
for (tmp = g_list_last(stack->sorted); tmp != NULL; tmp = tmp->prev)
{
MetaWindow *w = tmp->data;
Window top_level_window;
guint64 top_level_window;
guint64 stack_id;
if (w->unmanaging)
@ -1100,7 +1100,8 @@ stack_sync_to_xserver (MetaStack *stack)
/* The screen guard window sits above all hidden windows and acts as
* a barrier to input reaching these windows. */
g_array_append_val (x11_hidden_stack_ids, stack->screen->guard_window);
guint64 guard_window_id = stack->screen->guard_window;
g_array_append_val (x11_hidden_stack_ids, guard_window_id);
/* Sync to server */

View File

@ -34,4 +34,6 @@ MetaMonitorManager *meta_monitor_manager_get (void);
gint meta_monitor_manager_get_monitor_for_output (MetaMonitorManager *manager,
guint id);
gboolean meta_monitor_manager_get_is_builtin_display_on (MetaMonitorManager *manager);
#endif /* META_MONITOR_MANAGER_H */

View File

@ -992,6 +992,7 @@ create_style_context (GType widget_type,
...)
{
GtkStyleContext *style;
GtkStateFlags state;
GtkWidgetPath *path;
const char *name;
va_list ap;
@ -1010,6 +1011,19 @@ create_style_context (GType widget_type,
if (object_name)
gtk_widget_path_iter_set_object_name (path, -1, object_name);
state = gtk_style_context_get_state (style);
if (meta_get_locale_direction() == META_LOCALE_DIRECTION_RTL)
{
state |= GTK_STATE_FLAG_DIR_RTL;
state &= ~GTK_STATE_FLAG_DIR_LTR;
}
else
{
state |= GTK_STATE_FLAG_DIR_LTR;
state &= ~GTK_STATE_FLAG_DIR_RTL;
}
gtk_style_context_set_state (style, state);
va_start (ap, first_class);
for (name = first_class; name; name = va_arg (ap, const char *))
gtk_widget_path_iter_add_class (path, -1, name);

View File

@ -134,12 +134,19 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
for (i = 0; i < n_rectangles; i++)
{
CoglError *error = NULL;
cairo_rectangle_int_t rect;
cairo_region_get_rectangle (region, i, &rect);
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
rect.x, rect.y, rect.width, rect.height,
shm_buffer,
rect.x, rect.y, 0, NULL);
rect.x, rect.y, 0, &error);
if (error)
{
meta_warning ("Failed to set texture region: %s\n", error->message);
cogl_error_free (error);
}
}
wl_shm_buffer_end_access (shm_buffer);

View File

@ -1424,9 +1424,10 @@ meta_wayland_drag_dest_focus_out (MetaWaylandDataDevice *data_device,
{
MetaWaylandDragGrab *grab = data_device->current_grab;
if (grab->drag_focus_data_device)
wl_data_device_send_leave (grab->drag_focus_data_device);
if (!grab->drag_focus_data_device)
return;
wl_data_device_send_leave (grab->drag_focus_data_device);
wl_list_remove (&grab->drag_focus_listener.link);
grab->drag_focus_data_device = NULL;
}
@ -1439,6 +1440,9 @@ meta_wayland_drag_dest_motion (MetaWaylandDataDevice *data_device,
MetaWaylandDragGrab *grab = data_device->current_grab;
wl_fixed_t sx, sy;
if (!grab->drag_focus_data_device)
return;
meta_wayland_pointer_get_relative_coordinates (grab->generic.pointer,
grab->drag_focus,
&sx, &sy);
@ -1453,6 +1457,9 @@ meta_wayland_drag_dest_drop (MetaWaylandDataDevice *data_device,
{
MetaWaylandDragGrab *grab = data_device->current_grab;
if (!grab->drag_focus_data_device)
return;
wl_data_device_send_drop (grab->drag_focus_data_device);
}

View File

@ -58,6 +58,7 @@
#include <sys/mman.h>
#include <clutter/evdev/clutter-evdev.h>
#include "display-private.h"
#include "backends/meta-backend-private.h"
#include "meta-wayland-private.h"
@ -279,14 +280,66 @@ notify_key (MetaWaylandKeyboard *keyboard,
return keyboard->grab->interface->key (keyboard->grab, event);
}
static xkb_mod_mask_t
add_vmod (xkb_mod_mask_t mask,
xkb_mod_mask_t mod,
xkb_mod_mask_t vmod,
xkb_mod_mask_t *added)
{
if ((mask & mod) && !(mod & *added))
{
mask |= vmod;
*added |= mod;
}
return mask;
}
static xkb_mod_mask_t
add_virtual_mods (xkb_mod_mask_t mask)
{
MetaKeyBindingManager *keys = &(meta_get_display ()->key_binding_manager);
xkb_mod_mask_t added;
guint i;
/* Order is important here: if multiple vmods share the same real
modifier we only want to add the first. */
struct {
xkb_mod_mask_t mod;
xkb_mod_mask_t vmod;
} mods[] = {
{ keys->super_mask, keys->virtual_super_mask },
{ keys->hyper_mask, keys->virtual_hyper_mask },
{ keys->meta_mask, keys->virtual_meta_mask },
};
added = 0;
for (i = 0; i < G_N_ELEMENTS (mods); ++i)
mask = add_vmod (mask, mods[i].mod, mods[i].vmod, &added);
return mask;
}
static void
keyboard_send_modifiers (MetaWaylandKeyboard *keyboard,
struct wl_resource *resource,
uint32_t serial)
{
struct xkb_state *state = keyboard->xkb_info.state;
xkb_mod_mask_t depressed, latched, locked;
depressed = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED));
latched = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED));
locked = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED));
wl_keyboard_send_modifiers (resource, serial, depressed, latched, locked,
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
}
static void
meta_wayland_keyboard_broadcast_modifiers (MetaWaylandKeyboard *keyboard)
{
struct xkb_state *state;
struct wl_resource *resource;
struct wl_list *l;
state = keyboard->xkb_info.state;
l = &keyboard->focus_resource_list;
if (!wl_list_empty (l))
@ -294,14 +347,7 @@ meta_wayland_keyboard_broadcast_modifiers (MetaWaylandKeyboard *keyboard)
uint32_t serial = wl_display_next_serial (keyboard->display);
wl_resource_for_each (resource, l)
{
wl_keyboard_send_modifiers (resource,
serial,
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
}
keyboard_send_modifiers (keyboard, resource, serial);
}
}
@ -509,6 +555,13 @@ meta_wayland_keyboard_update (MetaWaylandKeyboard *keyboard,
{
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
/* If we get a key event but still have pending modifier state
* changes from a previous event that didn't get cleared, we need to
* send that state right away so that the new key event can be
* interpreted by clients correctly modified. */
if (keyboard->mods_changed)
notify_modifiers (keyboard);
keyboard->mods_changed = xkb_state_update_key (keyboard->xkb_info.state,
event->hardware_keycode,
is_press ? XKB_KEY_DOWN : XKB_KEY_UP);
@ -602,7 +655,6 @@ broadcast_focus (MetaWaylandKeyboard *keyboard,
struct wl_resource *resource)
{
struct wl_array fake_keys;
struct xkb_state *state = keyboard->xkb_info.state;
/* We never want to send pressed keys to wayland clients on
* enter. The protocol says that we should send them, presumably so
@ -622,11 +674,7 @@ broadcast_focus (MetaWaylandKeyboard *keyboard,
*/
wl_array_init (&fake_keys);
wl_keyboard_send_modifiers (resource, keyboard->focus_serial,
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
keyboard_send_modifiers (keyboard, resource, keyboard->focus_serial);
wl_keyboard_send_enter (resource, keyboard->focus_serial,
keyboard->focus_surface->resource,
&fake_keys);

View File

@ -1138,8 +1138,7 @@ meta_wayland_pointer_can_grab_surface (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
uint32_t serial)
{
return (pointer->button_count > 0 &&
pointer->grab_serial == serial &&
return (pointer->grab_serial == serial &&
pointer->focus_surface == surface);
}

View File

@ -374,10 +374,11 @@ meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
gboolean
meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
MetaWaylandSurface *surface,
uint32_t serial,
gfloat *x,
gfloat *y)
MetaWaylandSurface *surface,
uint32_t serial,
gboolean require_pressed,
gfloat *x,
gfloat *y)
{
ClutterEventSequence *sequence = NULL;
gboolean can_grab_surface = FALSE;
@ -391,7 +392,8 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
}
else
{
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0)
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0 &&
(!require_pressed || seat->pointer.button_count > 0))
can_grab_surface = meta_wayland_pointer_can_grab_surface (&seat->pointer, surface, serial);
if (can_grab_surface)

View File

@ -60,10 +60,11 @@ void meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
void meta_wayland_seat_repick (MetaWaylandSeat *seat);
gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
MetaWaylandSurface *surface,
uint32_t serial,
gfloat *x,
gfloat *y);
MetaWaylandSurface *surface,
uint32_t serial,
gboolean require_pressed,
gfloat *x,
gfloat *y);
gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
uint32_t serial);

View File

@ -1362,7 +1362,7 @@ xdg_surface_show_window_menu (struct wl_client *client,
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, NULL, NULL))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
return;
meta_window_show_menu (surface->window, META_WINDOW_MENU_WM,
@ -1382,12 +1382,15 @@ begin_grab_op_on_surface (MetaWaylandSurface *surface,
if (grab_op == META_GRAB_OP_NONE)
return FALSE;
/* This is an input driven operation so we set frame_action to
constrain it in the same way as it would be if the window was
being moved/resized via a SSD event. */
return meta_display_begin_grab_op (window->display,
window->screen,
window,
grab_op,
TRUE, /* pointer_already_grabbed */
FALSE, /* frame_action */
TRUE, /* frame_action */
1, /* button. XXX? */
0, /* modmask */
meta_display_get_current_time_roundtrip (window->display),
@ -1404,7 +1407,7 @@ xdg_surface_move (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
@ -1444,7 +1447,7 @@ xdg_surface_resize (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, grab_op_for_xdg_surface_resize_edge (edges), x, y);
@ -1787,7 +1790,7 @@ wl_shell_surface_move (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
@ -1827,7 +1830,7 @@ wl_shell_surface_resize (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, grab_op_for_wl_shell_surface_resize_edge (edges), x, y);