Compare commits
4 Commits
3.20.2
...
wip/tiling
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea901abd61 | ||
![]() |
4e5e6aa7f8 | ||
![]() |
8e587e2e42 | ||
![]() |
93901dc32f |
27
NEWS
27
NEWS
@@ -1,30 +1,3 @@
|
||||
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]
|
||||
|
@@ -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], [2])
|
||||
m4_define([mutter_micro_version], [0])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
73
po/pt.po
73
po/pt.po
@@ -3,22 +3,21 @@
|
||||
# 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: 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"
|
||||
"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"
|
||||
"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: Poedit 1.5.4\n"
|
||||
"X-Generator: Gtranslator 2.91.6\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:1
|
||||
@@ -42,6 +41,7 @@ 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,6 +82,7 @@ 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"
|
||||
|
||||
@@ -90,6 +91,7 @@ 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"
|
||||
|
||||
@@ -98,6 +100,7 @@ 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"
|
||||
|
||||
@@ -106,6 +109,7 @@ 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"
|
||||
|
||||
@@ -122,6 +126,7 @@ 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"
|
||||
|
||||
@@ -130,6 +135,7 @@ 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"
|
||||
|
||||
@@ -154,6 +160,7 @@ 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"
|
||||
|
||||
@@ -408,69 +415,81 @@ 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:515
|
||||
#: ../src/backends/meta-monitor-manager.c:496
|
||||
msgid "Built-in display"
|
||||
msgstr "Ecrã embutido"
|
||||
|
||||
#: ../src/backends/meta-monitor-manager.c:538
|
||||
#: ../src/backends/meta-monitor-manager.c:522
|
||||
msgid "Unknown"
|
||||
msgstr "Desconhecido"
|
||||
|
||||
#: ../src/backends/meta-monitor-manager.c:540
|
||||
#: ../src/backends/meta-monitor-manager.c:524
|
||||
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:548
|
||||
#: ../src/backends/meta-monitor-manager.c:532
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
@@ -486,7 +505,7 @@ msgstr ""
|
||||
"Já se encontra em execução outro gestor de janelas no ecrã %i do monitor \"%s"
|
||||
"\"."
|
||||
|
||||
#: ../src/core/bell.c:194
|
||||
#: ../src/core/bell.c:185
|
||||
msgid "Bell event"
|
||||
msgstr "Evento de campainha"
|
||||
|
||||
@@ -515,45 +534,40 @@ msgstr "_Aguardar"
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Forçar terminar"
|
||||
|
||||
#: ../src/core/display.c:555
|
||||
#: ../src/core/display.c:563
|
||||
#, 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:181
|
||||
#: ../src/core/main.c:176
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Desativar a ligação ao gestor de sessão"
|
||||
|
||||
#: ../src/core/main.c:187
|
||||
#: ../src/core/main.c:182
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Substituir o gestor de janelas em execução"
|
||||
|
||||
#: ../src/core/main.c:193
|
||||
#: ../src/core/main.c:188
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Especificar a ID de gestão de sessão"
|
||||
|
||||
#: ../src/core/main.c:198
|
||||
#: ../src/core/main.c:193
|
||||
msgid "X Display to use"
|
||||
msgstr "Ecrã X a utilizar"
|
||||
|
||||
#: ../src/core/main.c:204
|
||||
#: ../src/core/main.c:199
|
||||
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:210
|
||||
#: ../src/core/main.c:205
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Fazer as chamadas X sincronamente"
|
||||
|
||||
#: ../src/core/main.c:217
|
||||
#: ../src/core/main.c:212
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Executar como compositor wayland"
|
||||
|
||||
#: ../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
|
||||
#: ../src/core/main.c:220
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Executar como servidor de ecrã completo, em vez de aninhado"
|
||||
|
||||
@@ -581,13 +595,16 @@ msgstr "Imprimir a versão"
|
||||
msgid "Mutter plugin to use"
|
||||
msgstr "Extensão Mutter a utilizar"
|
||||
|
||||
#: ../src/core/prefs.c:1997
|
||||
#: ../src/core/prefs.c:2004
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Área de trabalho %d"
|
||||
|
||||
#: ../src/core/screen.c:521
|
||||
#: ../src/core/screen.c:525
|
||||
#, 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."
|
||||
@@ -595,12 +612,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:603
|
||||
#: ../src/core/screen.c:607
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Ecrã %d no monitor \"%s\" é inválido\n"
|
||||
|
||||
#: ../src/core/util.c:121
|
||||
#: ../src/core/util.c:118
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "O Mutter foi compilado sem suporte para modo verboso\n"
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <meta/meta-backend.h>
|
||||
#include <meta/util.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <cogl/cogl.h>
|
||||
#include <clutter/clutter.h>
|
||||
|
@@ -198,7 +198,6 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
||||
guint8 *cursor_data;
|
||||
gboolean free_cursor_data;
|
||||
CoglContext *ctx;
|
||||
CoglError *error = NULL;
|
||||
|
||||
if (tracker->xfixes_cursor)
|
||||
return;
|
||||
@@ -240,17 +239,11 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
||||
CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
cursor_image->width * 4, /* stride */
|
||||
cursor_data,
|
||||
&error);
|
||||
NULL);
|
||||
|
||||
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 ();
|
||||
|
@@ -136,7 +136,6 @@ 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);
|
||||
|
||||
@@ -157,19 +156,10 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
||||
cogl_format,
|
||||
rowstride,
|
||||
(uint8_t *) xc_image->pixels,
|
||||
&error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
|
||||
cogl_error_free (error);
|
||||
}
|
||||
|
||||
NULL);
|
||||
meta_cursor_sprite_set_texture (self, texture,
|
||||
xc_image->xhot, xc_image->yhot);
|
||||
|
||||
if (texture)
|
||||
cogl_object_unref (texture);
|
||||
cogl_object_unref (texture);
|
||||
|
||||
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
|
||||
}
|
||||
|
@@ -913,13 +913,23 @@ 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)
|
||||
{
|
||||
@@ -1041,17 +1051,6 @@ 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)
|
||||
@@ -1093,7 +1092,7 @@ find_primary_output (MetaOutput *outputs,
|
||||
|
||||
for (i = 0; i < n_outputs; i++)
|
||||
{
|
||||
if (meta_output_is_laptop (&outputs[i]))
|
||||
if (output_is_laptop (&outputs[i]))
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -1555,19 +1554,18 @@ 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);
|
||||
gboolean ok = apply_configuration (self, prev_config, manager);
|
||||
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;
|
||||
}
|
||||
|
||||
if (!meta_monitor_config_apply_stored (self, manager))
|
||||
meta_monitor_config_make_default (self, manager);
|
||||
else
|
||||
{
|
||||
if (!meta_monitor_config_apply_stored (self, manager))
|
||||
meta_monitor_config_make_default (self, manager);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2031,11 +2029,7 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
|
||||
|
||||
all_outputs = meta_monitor_manager_get_outputs (manager,
|
||||
&n_outputs);
|
||||
if (n_outputs != config->n_outputs)
|
||||
{
|
||||
g_hash_table_destroy (assignment.info);
|
||||
return FALSE;
|
||||
}
|
||||
g_assert (n_outputs == config->n_outputs);
|
||||
|
||||
for (i = 0; i < n_outputs; i++)
|
||||
{
|
||||
|
@@ -49,6 +49,4 @@ 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 */
|
||||
|
@@ -398,7 +398,6 @@ 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);
|
||||
|
@@ -511,8 +511,14 @@ make_display_name (MetaMonitorManager *manager,
|
||||
g_autofree char *inches = NULL;
|
||||
g_autofree char *vendor_name = NULL;
|
||||
|
||||
if (meta_output_is_laptop (output))
|
||||
switch (output->connector_type)
|
||||
{
|
||||
case META_CONNECTOR_TYPE_LVDS:
|
||||
case META_CONNECTOR_TYPE_eDP:
|
||||
return g_strdup (_("Built-in display"));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (output->width_mm > 0 && output->height_mm > 0)
|
||||
{
|
||||
@@ -1458,21 +1464,6 @@ 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)
|
||||
{
|
||||
@@ -1599,11 +1590,3 @@ 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);
|
||||
}
|
||||
|
@@ -152,7 +152,6 @@ 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;
|
||||
@@ -187,10 +186,9 @@ file_loaded (GObject *source_object,
|
||||
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
||||
row_stride,
|
||||
pixels, 0,
|
||||
&catch_error))
|
||||
NULL))
|
||||
{
|
||||
g_warning ("Failed to create texture for background");
|
||||
cogl_error_free (catch_error);
|
||||
cogl_object_unref (texture);
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* 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"
|
||||
@@ -543,7 +542,6 @@ 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;
|
||||
|
||||
@@ -584,13 +582,7 @@ ensure_color_texture (MetaBackground *self)
|
||||
COGL_PIXEL_FORMAT_RGB_888,
|
||||
width * 3,
|
||||
pixels,
|
||||
&error));
|
||||
|
||||
if (error != NULL)
|
||||
{
|
||||
meta_warning ("Failed to allocate color texture: %s\n", error->message);
|
||||
cogl_error_free (error);
|
||||
}
|
||||
NULL));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <meta/meta-shadow-factory.h>
|
||||
#include <meta/util.h>
|
||||
|
||||
#include "cogl-utils.h"
|
||||
#include "region-utils.h"
|
||||
@@ -708,7 +707,6 @@ 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;
|
||||
@@ -806,13 +804,7 @@ make_shadow (MetaShadow *shadow,
|
||||
(buffer +
|
||||
(y_offset - shadow->outer_border_top) * buffer_width +
|
||||
(x_offset - shadow->outer_border_left)),
|
||||
&error));
|
||||
|
||||
if (error)
|
||||
{
|
||||
meta_warning ("Failed to allocate shadow texture: %s\n", error->message);
|
||||
cogl_error_free (error);
|
||||
}
|
||||
NULL));
|
||||
|
||||
cairo_region_destroy (row_convolve_region);
|
||||
cairo_region_destroy (column_convolve_region);
|
||||
|
@@ -102,7 +102,8 @@ detach_pixmap (MetaSurfaceActorX11 *self)
|
||||
priv->pixmap = None;
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||
cogl_object_unref (priv->texture);
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -113,20 +114,14 @@ 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, &error));
|
||||
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, NULL));
|
||||
|
||||
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))))
|
||||
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;
|
||||
|
@@ -817,13 +817,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
||||
meta_window_is_fullscreen (priv->window))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* If we have two snap-tiled windows, we don't want the shadow to obstruct
|
||||
* the other window.
|
||||
*/
|
||||
if (meta_window_get_tile_match (priv->window))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Always put a shadow around windows with a frame - This should override
|
||||
* the restriction about not putting a shadow around ARGB windows.
|
||||
@@ -1752,17 +1745,9 @@ 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, &error));
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_warning ("Failed to allocate mask texture: %s", error->message);
|
||||
cogl_error_free (error);
|
||||
}
|
||||
stride, mask_data, NULL));
|
||||
}
|
||||
|
||||
meta_shaped_texture_set_mask_texture (stex, mask_texture);
|
||||
|
@@ -97,7 +97,7 @@ typedef enum
|
||||
PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA = 1,
|
||||
PRIORITY_SIZE_HINTS_INCREMENTS = 1,
|
||||
PRIORITY_MAXIMIZATION = 2,
|
||||
PRIORITY_TILING = 2,
|
||||
PRIORITY_CONSTRAINED_EDGES = 2,
|
||||
PRIORITY_FULLSCREEN = 2,
|
||||
PRIORITY_SIZE_HINTS_LIMITS = 3,
|
||||
PRIORITY_TITLEBAR_VISIBLE = 4,
|
||||
@@ -152,7 +152,7 @@ static gboolean constrain_maximization (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_tiling (MetaWindow *window,
|
||||
static gboolean constrain_constrained_edges (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
@@ -213,7 +213,7 @@ typedef struct {
|
||||
static const Constraint all_constraints[] = {
|
||||
{constrain_modal_dialog, "constrain_modal_dialog"},
|
||||
{constrain_maximization, "constrain_maximization"},
|
||||
{constrain_tiling, "constrain_tiling"},
|
||||
{constrain_constrained_edges, "constrain_constrained_edges"},
|
||||
{constrain_fullscreen, "constrain_fullscreen"},
|
||||
{constrain_size_increments, "constrain_size_increments"},
|
||||
{constrain_size_limits, "constrain_size_limits"},
|
||||
@@ -701,16 +701,11 @@ constrain_maximization (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if ((!window->maximized_horizontally && !window->maximized_vertically) ||
|
||||
META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
if (!window->maximized_horizontally && !window->maximized_vertically)
|
||||
return TRUE;
|
||||
|
||||
/* Calculate target_size = maximized size of (window + frame) */
|
||||
if (META_WINDOW_TILED_MAXIMIZED (window))
|
||||
{
|
||||
meta_window_get_current_tile_area (window, &target_size);
|
||||
}
|
||||
else if (META_WINDOW_MAXIMIZED (window))
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
target_size = info->work_area_monitor;
|
||||
}
|
||||
@@ -773,58 +768,6 @@ constrain_maximization (MetaWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_tiling (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle target_size;
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_TILING)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
return TRUE;
|
||||
|
||||
/* Calculate target_size - as the tile previews need this as well, we
|
||||
* use an external function for the actual calculation
|
||||
*/
|
||||
meta_window_get_current_tile_area (window, &target_size);
|
||||
|
||||
/* Check min size constraints; max size constraints are ignored as for
|
||||
* maximized windows.
|
||||
*/
|
||||
get_size_limits (window, &min_size, &max_size);
|
||||
hminbad = target_size.width < min_size.width;
|
||||
vminbad = target_size.height < min_size.height;
|
||||
if (hminbad || vminbad)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
horiz_equal = target_size.x == info->current.x &&
|
||||
target_size.width == info->current.width;
|
||||
vert_equal = target_size.y == info->current.y &&
|
||||
target_size.height == info->current.height;
|
||||
constraint_already_satisfied = horiz_equal && vert_equal;
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
|
||||
/*** Enforce constraint ***/
|
||||
info->current.x = target_size.x;
|
||||
info->current.width = target_size.width;
|
||||
info->current.y = target_size.y;
|
||||
info->current.height = target_size.height;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
constrain_fullscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
@@ -860,6 +803,45 @@ constrain_fullscreen (MetaWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_constrained_edges (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle monitor, new_rectangle;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_CONSTRAINED_EDGES)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if (!window->constrained_edges)
|
||||
return TRUE;
|
||||
|
||||
new_rectangle = info->current;
|
||||
monitor = info->work_area_monitor;
|
||||
|
||||
if (window->constrained_edges & META_DIRECTION_LEFT)
|
||||
new_rectangle.x = monitor.x;
|
||||
if (window->constrained_edges & META_DIRECTION_RIGHT)
|
||||
new_rectangle.x = monitor.x + monitor.width - new_rectangle.width;
|
||||
if (window->constrained_edges & META_DIRECTION_TOP)
|
||||
new_rectangle.y = monitor.y;
|
||||
if (window->constrained_edges & META_DIRECTION_BOTTOM)
|
||||
new_rectangle.y = monitor.y + monitor.height - new_rectangle.height;
|
||||
|
||||
constraint_already_satisfied =
|
||||
meta_rectangle_equal (&info->current, &new_rectangle);
|
||||
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
|
||||
/*** Enforce constraint ***/
|
||||
info->current = new_rectangle;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_size_increments (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
@@ -877,7 +859,6 @@ constrain_size_increments (MetaWindow *window,
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if (META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
|
||||
META_WINDOW_TILED_SIDE_BY_SIDE (window) ||
|
||||
info->action_type == ACTION_MOVE)
|
||||
return TRUE;
|
||||
|
||||
@@ -1020,7 +1001,6 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
constraints_are_inconsistent = minr > maxr;
|
||||
if (constraints_are_inconsistent ||
|
||||
META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
|
||||
META_WINDOW_TILED_SIDE_BY_SIDE (window) ||
|
||||
info->action_type == ACTION_MOVE)
|
||||
return TRUE;
|
||||
|
||||
|
@@ -74,13 +74,6 @@ typedef enum {
|
||||
*/
|
||||
#define N_IGNORED_CROSSING_SERIALS 10
|
||||
|
||||
typedef enum {
|
||||
META_TILE_NONE,
|
||||
META_TILE_LEFT,
|
||||
META_TILE_RIGHT,
|
||||
META_TILE_MAXIMIZED
|
||||
} MetaTileMode;
|
||||
|
||||
typedef enum {
|
||||
/* Normal interaction where you're interacting with windows.
|
||||
* Events go to windows normally. */
|
||||
@@ -211,8 +204,6 @@ struct _MetaDisplay
|
||||
int grab_anchor_root_x;
|
||||
int grab_anchor_root_y;
|
||||
MetaRectangle grab_anchor_window_pos;
|
||||
MetaTileMode grab_tile_mode;
|
||||
int grab_tile_monitor_number;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
guint grab_have_pointer : 1;
|
||||
|
@@ -649,8 +649,6 @@ meta_display_open (void)
|
||||
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
display->grab_window = NULL;
|
||||
display->grab_tile_mode = META_TILE_NONE;
|
||||
display->grab_tile_monitor_number = -1;
|
||||
|
||||
display->grab_edge_resistance_data = NULL;
|
||||
|
||||
@@ -1894,8 +1892,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
display->grab_op = op;
|
||||
display->grab_window = grab_window;
|
||||
display->grab_button = button;
|
||||
display->grab_tile_mode = grab_window->tile_mode;
|
||||
display->grab_tile_monitor_number = grab_window->tile_monitor_number;
|
||||
display->grab_anchor_root_x = root_x;
|
||||
display->grab_anchor_root_y = root_y;
|
||||
display->grab_latest_motion_x = root_x;
|
||||
@@ -1993,8 +1989,6 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
|
||||
display->event_route = META_EVENT_ROUTE_NORMAL;
|
||||
display->grab_window = NULL;
|
||||
display->grab_tile_mode = META_TILE_NONE;
|
||||
display->grab_tile_monitor_number = -1;
|
||||
|
||||
meta_display_update_cursor (display);
|
||||
|
||||
|
@@ -274,12 +274,6 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (META_WINDOW_MAXIMIZED (frame->window))
|
||||
flags |= META_FRAME_MAXIMIZED;
|
||||
|
||||
if (META_WINDOW_TILED_LEFT (frame->window))
|
||||
flags |= META_FRAME_TILED_LEFT;
|
||||
|
||||
if (META_WINDOW_TILED_RIGHT (frame->window))
|
||||
flags |= META_FRAME_TILED_RIGHT;
|
||||
|
||||
if (frame->window->fullscreen)
|
||||
flags |= META_FRAME_FULLSCREEN;
|
||||
|
||||
@@ -289,6 +283,18 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (frame->window->wm_state_above)
|
||||
flags |= META_FRAME_ABOVE;
|
||||
|
||||
if (frame->window->constrained_edges & META_DIRECTION_LEFT)
|
||||
flags |= META_FRAME_CONSTRAINED_LEFT_EDGE;
|
||||
|
||||
if (frame->window->constrained_edges & META_DIRECTION_RIGHT)
|
||||
flags |= META_FRAME_CONSTRAINED_RIGHT_EDGE;
|
||||
|
||||
if (frame->window->constrained_edges & META_DIRECTION_TOP)
|
||||
flags |= META_FRAME_CONSTRAINED_TOP_EDGE;
|
||||
|
||||
if (frame->window->constrained_edges & META_DIRECTION_BOTTOM)
|
||||
flags |= META_FRAME_CONSTRAINED_BOTTOM_EDGE;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@@ -94,11 +94,8 @@ 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;
|
||||
|
@@ -185,18 +185,16 @@ 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, &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 },
|
||||
{ "ScrollLock", &scroll_lock_mask },
|
||||
{ "Meta", &keys->meta_mask },
|
||||
{ "Hyper", &keys->hyper_mask },
|
||||
{ "Super", &keys->super_mask },
|
||||
};
|
||||
|
||||
scratch_state = xkb_state_new (keymap);
|
||||
@@ -205,7 +203,6 @@ 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)
|
||||
@@ -213,13 +210,9 @@ 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;
|
||||
*virtual_mask_p = 0;
|
||||
}
|
||||
*mask_p = 0;
|
||||
}
|
||||
|
||||
xkb_state_unref (scratch_state);
|
||||
@@ -904,9 +897,6 @@ 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);
|
||||
|
||||
@@ -979,6 +969,9 @@ 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.
|
||||
@@ -1015,6 +1008,9 @@ 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;
|
||||
|
||||
@@ -1041,6 +1037,9 @@ 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);
|
||||
|
||||
@@ -1080,6 +1079,9 @@ 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)
|
||||
@@ -1159,9 +1161,6 @@ 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);
|
||||
|
||||
@@ -1276,6 +1275,11 @@ 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;
|
||||
|
||||
@@ -1309,6 +1313,10 @@ 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;
|
||||
|
||||
@@ -1376,6 +1384,7 @@ 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;
|
||||
@@ -1399,7 +1408,8 @@ meta_display_grab_accelerator (MetaDisplay *display,
|
||||
if (get_keybinding (keys, &resolved_combo))
|
||||
return META_KEYBINDING_ACTION_NONE;
|
||||
|
||||
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
|
||||
if (META_IS_BACKEND_X11 (backend))
|
||||
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
|
||||
|
||||
grab = g_new0 (MetaKeyGrab, 1);
|
||||
grab->action = next_dynamic_keybinding_action ();
|
||||
@@ -1424,6 +1434,7 @@ gboolean
|
||||
meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
guint action)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaKeyBindingManager *keys = &display->key_binding_manager;
|
||||
MetaKeyBinding *binding;
|
||||
MetaKeyGrab *grab;
|
||||
@@ -1443,7 +1454,8 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
{
|
||||
guint32 index_key;
|
||||
|
||||
meta_change_keygrab (keys, display->screen->xroot, FALSE, &binding->resolved_combo);
|
||||
if (META_IS_BACKEND_X11 (backend))
|
||||
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));
|
||||
@@ -1470,9 +1482,6 @@ 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
|
||||
*/
|
||||
@@ -1504,9 +1513,6 @@ 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);
|
||||
|
||||
@@ -1519,6 +1525,10 @@ 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;
|
||||
@@ -1580,6 +1590,11 @@ 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);
|
||||
}
|
||||
|
||||
@@ -1986,23 +2001,13 @@ process_mouse_move_resize_grab (MetaDisplay *display,
|
||||
|
||||
if (event->keyval == CLUTTER_KEY_Escape)
|
||||
{
|
||||
/* Hide the tiling preview if necessary */
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
meta_screen_hide_tile_preview (screen);
|
||||
|
||||
/* Restore the original tile mode */
|
||||
window->tile_mode = display->grab_tile_mode;
|
||||
window->tile_monitor_number = display->grab_tile_monitor_number;
|
||||
|
||||
/* End move or resize and restore to original state. If the
|
||||
* window was a maximized window that had been "shaken loose" we
|
||||
* need to remaximize it. In normal cases, we need to do a
|
||||
* moveresize now to get the position back to the original.
|
||||
*/
|
||||
if (window->shaken_loose || window->tile_mode == META_TILE_MAXIMIZED)
|
||||
if (window->shaken_loose)
|
||||
meta_window_maximize (window, META_MAXIMIZE_BOTH);
|
||||
else if (window->tile_mode != META_TILE_NONE)
|
||||
meta_window_tile (window);
|
||||
else
|
||||
meta_window_move_resize_frame (display->grab_window,
|
||||
TRUE,
|
||||
@@ -2924,41 +2929,25 @@ handle_toggle_above (MetaDisplay *display,
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_tiled (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
handle_toggle_tiled_left (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
MetaTileMode mode = binding->handler->data;
|
||||
meta_window_toggle_tile (window, META_TILE_ZONE_W);
|
||||
}
|
||||
|
||||
if ((META_WINDOW_TILED_LEFT (window) && mode == META_TILE_LEFT) ||
|
||||
(META_WINDOW_TILED_RIGHT (window) && mode == META_TILE_RIGHT))
|
||||
{
|
||||
window->tile_monitor_number = window->saved_maximize ? window->monitor->number
|
||||
: -1;
|
||||
window->tile_mode = window->saved_maximize ? META_TILE_MAXIMIZED
|
||||
: META_TILE_NONE;
|
||||
|
||||
if (window->saved_maximize)
|
||||
meta_window_maximize (window, META_MAXIMIZE_BOTH);
|
||||
else
|
||||
meta_window_unmaximize (window, META_MAXIMIZE_BOTH);
|
||||
}
|
||||
else if (meta_window_can_tile_side_by_side (window))
|
||||
{
|
||||
window->tile_monitor_number = window->monitor->number;
|
||||
window->tile_mode = mode;
|
||||
/* Maximization constraints beat tiling constraints, so if the window
|
||||
* is maximized, tiling won't have any effect unless we unmaximize it
|
||||
* horizontally first; rather than calling meta_window_unmaximize(),
|
||||
* we just set the flag and rely on meta_window_tile() syncing it to
|
||||
* save an additional roundtrip.
|
||||
*/
|
||||
window->maximized_horizontally = FALSE;
|
||||
meta_window_tile (window);
|
||||
}
|
||||
static void
|
||||
handle_toggle_tiled_right (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
meta_window_toggle_tile (window, META_TILE_ZONE_E);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3691,14 +3680,14 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
mutter_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
|
||||
handle_toggle_tiled, META_TILE_LEFT);
|
||||
handle_toggle_tiled_left, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-tiled-right",
|
||||
mutter_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
|
||||
handle_toggle_tiled, META_TILE_RIGHT);
|
||||
handle_toggle_tiled_right, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-above",
|
||||
|
@@ -57,7 +57,13 @@ struct _MetaScreen
|
||||
MetaRectangle rect; /* Size of screen; rect.x & rect.y are always 0 */
|
||||
MetaUI *ui;
|
||||
|
||||
guint tile_preview_timeout_id;
|
||||
struct {
|
||||
gboolean exists;
|
||||
guint timeout_id;
|
||||
MetaWindow *window;
|
||||
MetaRectangle area;
|
||||
int monitor;
|
||||
} tile_preview;
|
||||
|
||||
MetaWorkspace *active_workspace;
|
||||
|
||||
@@ -132,9 +138,12 @@ void meta_screen_foreach_window (MetaScreen *scree
|
||||
|
||||
void meta_screen_update_cursor (MetaScreen *screen);
|
||||
|
||||
void meta_screen_update_tile_preview (MetaScreen *screen,
|
||||
gboolean delay);
|
||||
void meta_screen_hide_tile_preview (MetaScreen *screen);
|
||||
void meta_screen_update_tile_preview (MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
MetaRectangle area,
|
||||
int monitor,
|
||||
gboolean delay);
|
||||
void meta_screen_hide_tile_preview (MetaScreen *screen);
|
||||
|
||||
MetaWindow* meta_screen_get_mouse_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one);
|
||||
|
@@ -718,8 +718,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->ui = meta_ui_new (screen->display->xdisplay,
|
||||
screen->xscreen);
|
||||
|
||||
screen->tile_preview_timeout_id = 0;
|
||||
|
||||
screen->stack = meta_stack_new (screen);
|
||||
screen->stack_tracker = meta_stack_tracker_new (screen);
|
||||
|
||||
@@ -807,8 +805,8 @@ meta_screen_free (MetaScreen *screen,
|
||||
|
||||
g_free (screen->monitor_infos);
|
||||
|
||||
if (screen->tile_preview_timeout_id)
|
||||
g_source_remove (screen->tile_preview_timeout_id);
|
||||
if (screen->tile_preview.timeout_id)
|
||||
g_source_remove (screen->tile_preview.timeout_id);
|
||||
|
||||
g_free (screen->screen_name);
|
||||
|
||||
@@ -1288,44 +1286,20 @@ static gboolean
|
||||
meta_screen_update_tile_preview_timeout (gpointer data)
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
MetaWindow *window = screen->display->grab_window;
|
||||
gboolean needs_preview = FALSE;
|
||||
|
||||
screen->tile_preview_timeout_id = 0;
|
||||
screen->tile_preview.timeout_id = 0;
|
||||
|
||||
if (window)
|
||||
if (screen->tile_preview.exists)
|
||||
{
|
||||
switch (window->tile_mode)
|
||||
{
|
||||
case META_TILE_LEFT:
|
||||
case META_TILE_RIGHT:
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
needs_preview = TRUE;
|
||||
break;
|
||||
|
||||
case META_TILE_MAXIMIZED:
|
||||
if (!META_WINDOW_MAXIMIZED (window))
|
||||
needs_preview = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
needs_preview = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (needs_preview)
|
||||
{
|
||||
MetaRectangle tile_rect;
|
||||
int monitor;
|
||||
|
||||
monitor = meta_window_get_current_tile_monitor_number (window);
|
||||
meta_window_get_current_tile_area (window, &tile_rect);
|
||||
meta_compositor_show_tile_preview (screen->display->compositor,
|
||||
window, &tile_rect, monitor);
|
||||
screen->tile_preview.window,
|
||||
&screen->tile_preview.area,
|
||||
screen->tile_preview.monitor);
|
||||
}
|
||||
else
|
||||
meta_compositor_hide_tile_preview (screen->display->compositor);
|
||||
{
|
||||
meta_compositor_hide_tile_preview (screen->display->compositor);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1333,37 +1307,47 @@ meta_screen_update_tile_preview_timeout (gpointer data)
|
||||
#define TILE_PREVIEW_TIMEOUT_MS 200
|
||||
|
||||
void
|
||||
meta_screen_update_tile_preview (MetaScreen *screen,
|
||||
gboolean delay)
|
||||
meta_screen_update_tile_preview (MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
MetaRectangle area,
|
||||
int monitor,
|
||||
gboolean delay)
|
||||
{
|
||||
screen->tile_preview.exists = TRUE;
|
||||
screen->tile_preview.window = window;
|
||||
screen->tile_preview.area = area;
|
||||
screen->tile_preview.monitor = monitor;
|
||||
|
||||
if (delay)
|
||||
{
|
||||
if (screen->tile_preview_timeout_id > 0)
|
||||
if (screen->tile_preview.timeout_id > 0)
|
||||
return;
|
||||
|
||||
screen->tile_preview_timeout_id =
|
||||
screen->tile_preview.timeout_id =
|
||||
g_timeout_add (TILE_PREVIEW_TIMEOUT_MS,
|
||||
meta_screen_update_tile_preview_timeout,
|
||||
screen);
|
||||
g_source_set_name_by_id (screen->tile_preview_timeout_id,
|
||||
g_source_set_name_by_id (screen->tile_preview.timeout_id,
|
||||
"[mutter] meta_screen_update_tile_preview_timeout");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (screen->tile_preview_timeout_id > 0)
|
||||
g_source_remove (screen->tile_preview_timeout_id);
|
||||
if (screen->tile_preview.timeout_id > 0)
|
||||
g_source_remove (screen->tile_preview.timeout_id);
|
||||
|
||||
meta_screen_update_tile_preview_timeout ((gpointer)screen);
|
||||
meta_screen_update_tile_preview_timeout ((gpointer) screen);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_hide_tile_preview (MetaScreen *screen)
|
||||
{
|
||||
if (screen->tile_preview_timeout_id > 0)
|
||||
g_source_remove (screen->tile_preview_timeout_id);
|
||||
screen->tile_preview.exists = FALSE;
|
||||
|
||||
meta_compositor_hide_tile_preview (screen->display->compositor);
|
||||
if (screen->tile_preview.timeout_id > 0)
|
||||
g_source_remove (screen->tile_preview.timeout_id);
|
||||
|
||||
meta_screen_update_tile_preview_timeout ((gpointer) screen);
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
|
@@ -117,7 +117,6 @@ meta_stack_add (MetaStack *stack,
|
||||
window->desc, window->stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -153,7 +152,6 @@ meta_stack_remove (MetaStack *stack,
|
||||
GUINT_TO_POINTER (window->frame->xwindow));
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -163,7 +161,6 @@ meta_stack_update_layer (MetaStack *stack,
|
||||
stack->need_relayer = TRUE;
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +170,6 @@ meta_stack_update_transient (MetaStack *stack,
|
||||
stack->need_constrain = TRUE;
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
/* raise/lower within a layer */
|
||||
@@ -202,7 +198,6 @@ meta_stack_raise (MetaStack *stack,
|
||||
meta_window_set_stack_position_no_sync (window, max_stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -230,7 +225,6 @@ meta_stack_lower (MetaStack *stack,
|
||||
meta_window_set_stack_position_no_sync (window, min_stack_position);
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -246,27 +240,6 @@ meta_stack_thaw (MetaStack *stack)
|
||||
|
||||
stack->freeze_count -= 1;
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
GList *windows, *tmp;
|
||||
|
||||
if (stack->freeze_count > 0)
|
||||
return;
|
||||
|
||||
windows = meta_stack_list_windows (stack, workspace);
|
||||
tmp = windows;
|
||||
while (tmp)
|
||||
{
|
||||
meta_window_compute_tile_match ((MetaWindow *) tmp->data);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1061,7 +1034,7 @@ stack_sync_to_xserver (MetaStack *stack)
|
||||
for (tmp = g_list_last(stack->sorted); tmp != NULL; tmp = tmp->prev)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
guint64 top_level_window;
|
||||
Window top_level_window;
|
||||
guint64 stack_id;
|
||||
|
||||
if (w->unmanaging)
|
||||
@@ -1100,8 +1073,7 @@ 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. */
|
||||
guint64 guard_window_id = stack->screen->guard_window;
|
||||
g_array_append_val (x11_hidden_stack_ids, guard_window_id);
|
||||
g_array_append_val (x11_hidden_stack_ids, stack->screen->guard_window);
|
||||
|
||||
/* Sync to server */
|
||||
|
||||
@@ -1449,7 +1421,6 @@ meta_stack_set_positions (MetaStack *stack,
|
||||
"Reset the stack positions of (nearly) all windows\n");
|
||||
|
||||
stack_sync_to_xserver (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1512,6 +1483,4 @@ meta_window_set_stack_position (MetaWindow *window,
|
||||
{
|
||||
meta_window_set_stack_position_no_sync (window, position);
|
||||
stack_sync_to_xserver (window->screen->stack);
|
||||
meta_stack_update_window_tile_matches (window->screen->stack,
|
||||
window->screen->active_workspace);
|
||||
}
|
||||
|
@@ -413,6 +413,4 @@ GList* meta_stack_get_positions (MetaStack *stack);
|
||||
void meta_stack_set_positions (MetaStack *stack,
|
||||
GList *windows);
|
||||
|
||||
void meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||
MetaWorkspace *workspace);
|
||||
#endif
|
||||
|
@@ -88,6 +88,20 @@ typedef enum
|
||||
META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED = 1 << 2,
|
||||
} MetaMoveResizeResultFlags;
|
||||
|
||||
/* This contains all the "state" needed for a certain size configuration.
|
||||
* We have three of these size configurations: normal, tiled, and
|
||||
* maximized. The idea here is that if the user tiles a normal window,
|
||||
* then maximizes it, we should, upon unmaximizing and untiling the window,
|
||||
* return to a normal state. We need a way of storing this information
|
||||
* while maximized, so we use this structure. */
|
||||
struct _MetaWindowSizeState
|
||||
{
|
||||
guint maximized_horizontally : 1;
|
||||
guint maximized_vertically : 1;
|
||||
MetaRectangle rect;
|
||||
};
|
||||
typedef struct _MetaWindowSizeState MetaWindowSizeState;
|
||||
|
||||
struct _MetaWindow
|
||||
{
|
||||
GObject parent_instance;
|
||||
@@ -157,14 +171,6 @@ struct _MetaWindow
|
||||
guint maximize_vertically_after_placement : 1;
|
||||
guint minimize_after_placement : 1;
|
||||
|
||||
/* The current or requested tile mode. If maximized_vertically is true,
|
||||
* this is the current mode. If not, it is the mode which will be
|
||||
* requested after the window grab is released */
|
||||
guint tile_mode : 2;
|
||||
/* The last "full" maximized/unmaximized state. We need to keep track of
|
||||
* that to toggle between normal/tiled or maximized/tiled states. */
|
||||
guint saved_maximize : 1;
|
||||
int tile_monitor_number;
|
||||
int preferred_output_winsys_id;
|
||||
|
||||
/* Whether we're shaded */
|
||||
@@ -401,9 +407,6 @@ struct _MetaWindow
|
||||
/* The current window geometry of the window. */
|
||||
MetaRectangle rect;
|
||||
|
||||
/* The geometry to restore when we unmaximize. */
|
||||
MetaRectangle saved_rect;
|
||||
|
||||
/* This is the geometry the window will have if no constraints have
|
||||
* applied. We use this whenever we are moving implicitly (for example,
|
||||
* if we move to avoid a panel, we can snap back to this position if
|
||||
@@ -441,11 +444,16 @@ struct _MetaWindow
|
||||
/* Focused window that is (directly or indirectly) attached to this one */
|
||||
MetaWindow *attached_focus_window;
|
||||
|
||||
/* The currently complementary tiled window, if any */
|
||||
MetaWindow *tile_match;
|
||||
|
||||
/* Bypass compositor hints */
|
||||
guint bypass_compositor;
|
||||
|
||||
/* This is where we store data while in another state. The information
|
||||
* above in MetaWindow is always the current state of the window. */
|
||||
struct {
|
||||
MetaWindowSizeState normal, tiled, maximized;
|
||||
} size_states;
|
||||
|
||||
MetaDirection constrained_edges;
|
||||
};
|
||||
|
||||
struct _MetaWindowClass
|
||||
@@ -492,17 +500,8 @@ struct _MetaWindowClass
|
||||
(w)->maximized_vertically)
|
||||
#define META_WINDOW_MAXIMIZED_VERTICALLY(w) ((w)->maximized_vertically)
|
||||
#define META_WINDOW_MAXIMIZED_HORIZONTALLY(w) ((w)->maximized_horizontally)
|
||||
#define META_WINDOW_TILED_SIDE_BY_SIDE(w) ((w)->maximized_vertically && \
|
||||
!(w)->maximized_horizontally && \
|
||||
(w)->tile_mode != META_TILE_NONE)
|
||||
#define META_WINDOW_TILED_LEFT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||
(w)->tile_mode == META_TILE_LEFT)
|
||||
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||
(w)->tile_mode == META_TILE_RIGHT)
|
||||
#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \
|
||||
(w)->tile_mode == META_TILE_MAXIMIZED)
|
||||
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
||||
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
|
||||
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
|
||||
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
||||
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
|
||||
((w)->size_hints.min_height < (w)->size_hints.max_height)))
|
||||
@@ -522,7 +521,6 @@ void meta_window_unmanage (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
void meta_window_queue (MetaWindow *window,
|
||||
guint queuebits);
|
||||
void meta_window_tile (MetaWindow *window);
|
||||
void meta_window_maximize_internal (MetaWindow *window,
|
||||
MetaMaximizeFlags directions,
|
||||
MetaRectangle *saved_rect);
|
||||
@@ -584,11 +582,6 @@ gboolean meta_window_handle_mouse_grab_op_event (MetaWindow *window,
|
||||
|
||||
GList* meta_window_get_workspaces (MetaWindow *window);
|
||||
|
||||
int meta_window_get_current_tile_monitor_number (MetaWindow *window);
|
||||
void meta_window_get_current_tile_area (MetaWindow *window,
|
||||
MetaRectangle *tile_area);
|
||||
|
||||
|
||||
gboolean meta_window_same_application (MetaWindow *window,
|
||||
MetaWindow *other_window);
|
||||
|
||||
@@ -626,9 +619,6 @@ void meta_window_update_for_monitors_changed (MetaWindow *window);
|
||||
void meta_window_on_all_workspaces_changed (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
||||
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
|
||||
|
||||
void meta_window_compute_tile_match (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_updates_are_frozen (MetaWindow *window);
|
||||
|
||||
@@ -695,4 +685,7 @@ gboolean meta_window_has_pointer (MetaWindow *window);
|
||||
|
||||
void meta_window_emit_size_changed (MetaWindow *window);
|
||||
|
||||
void meta_window_toggle_tile (MetaWindow *window,
|
||||
MetaTileZone tile_zone);
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,11 @@ typedef enum
|
||||
META_FRAME_IS_FLASHING = 1 << 14,
|
||||
META_FRAME_ABOVE = 1 << 15,
|
||||
META_FRAME_TILED_LEFT = 1 << 16,
|
||||
META_FRAME_TILED_RIGHT = 1 << 17
|
||||
META_FRAME_TILED_RIGHT = 1 << 17,
|
||||
META_FRAME_CONSTRAINED_LEFT_EDGE = 1 << 18,
|
||||
META_FRAME_CONSTRAINED_RIGHT_EDGE = 1 << 19,
|
||||
META_FRAME_CONSTRAINED_TOP_EDGE = 1 << 20,
|
||||
META_FRAME_CONSTRAINED_BOTTOM_EDGE = 1 << 21,
|
||||
} MetaFrameFlags;
|
||||
|
||||
/**
|
||||
@@ -317,6 +321,26 @@ typedef enum
|
||||
META_DIRECTION_VERTICAL = META_DIRECTION_UP | META_DIRECTION_DOWN,
|
||||
} MetaDirection;
|
||||
|
||||
/* Tile zones are specified in terms of their constrained edges.
|
||||
* So, "top left corner" is top and left, which should be obvious,
|
||||
* but "left side of the screen" is top, bottom, and left
|
||||
*/
|
||||
typedef enum {
|
||||
META_TILE_ZONE_MAXIMIZED_HORZ = META_DIRECTION_HORIZONTAL,
|
||||
META_TILE_ZONE_MAXIMIZED_VERT = META_DIRECTION_VERTICAL,
|
||||
META_TILE_ZONE_MAXIMIZED = META_TILE_ZONE_MAXIMIZED_HORZ | META_TILE_ZONE_MAXIMIZED_VERT,
|
||||
|
||||
META_TILE_ZONE_W = META_TILE_ZONE_MAXIMIZED_VERT | META_DIRECTION_LEFT,
|
||||
META_TILE_ZONE_E = META_TILE_ZONE_MAXIMIZED_VERT | META_DIRECTION_RIGHT,
|
||||
META_TILE_ZONE_N = META_TILE_ZONE_MAXIMIZED_HORZ | META_DIRECTION_TOP,
|
||||
META_TILE_ZONE_S = META_TILE_ZONE_MAXIMIZED_HORZ | META_DIRECTION_BOTTOM,
|
||||
|
||||
META_TILE_ZONE_NW = META_DIRECTION_TOP | META_DIRECTION_LEFT,
|
||||
META_TILE_ZONE_NE = META_DIRECTION_TOP | META_DIRECTION_RIGHT,
|
||||
META_TILE_ZONE_SW = META_DIRECTION_BOTTOM | META_DIRECTION_LEFT,
|
||||
META_TILE_ZONE_SE = META_DIRECTION_BOTTOM | META_DIRECTION_RIGHT,
|
||||
} MetaTileZone;
|
||||
|
||||
/**
|
||||
* MetaMotionDirection:
|
||||
* @META_MOTION_UP: Upwards motion
|
||||
|
@@ -34,6 +34,4 @@ 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 */
|
||||
|
@@ -214,8 +214,6 @@ MetaFrameType meta_window_get_frame_type (MetaWindow *window);
|
||||
|
||||
cairo_region_t *meta_window_get_frame_bounds (MetaWindow *window);
|
||||
|
||||
MetaWindow *meta_window_get_tile_match (MetaWindow *window);
|
||||
|
||||
void meta_window_make_fullscreen (MetaWindow *window);
|
||||
void meta_window_unmake_fullscreen (MetaWindow *window);
|
||||
void meta_window_make_above (MetaWindow *window);
|
||||
@@ -260,4 +258,8 @@ gboolean meta_window_is_client_decorated (MetaWindow *window);
|
||||
gboolean meta_window_titlebar_is_onscreen (MetaWindow *window);
|
||||
void meta_window_shove_titlebar_onscreen (MetaWindow *window);
|
||||
|
||||
void meta_window_tile (MetaWindow *window,
|
||||
MetaTileZone tile_zone);
|
||||
void meta_window_untile (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@@ -100,22 +100,25 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
|
||||
{
|
||||
borders->invisible.left = MAX (borders->invisible.left,
|
||||
draggable_borders - borders->visible.left);
|
||||
borders->invisible.right = MAX (borders->invisible.right,
|
||||
draggable_borders - borders->visible.right);
|
||||
if (!(flags & META_FRAME_CONSTRAINED_LEFT_EDGE))
|
||||
borders->invisible.left = MAX (borders->invisible.left,
|
||||
draggable_borders - borders->visible.left);
|
||||
if (!(flags & META_FRAME_CONSTRAINED_RIGHT_EDGE))
|
||||
borders->invisible.right = MAX (borders->invisible.right,
|
||||
draggable_borders - borders->visible.right);
|
||||
}
|
||||
|
||||
if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
|
||||
{
|
||||
borders->invisible.bottom = MAX (borders->invisible.bottom,
|
||||
draggable_borders - borders->visible.bottom);
|
||||
|
||||
/* borders.visible.top is the height of the *title bar*. We can't do the same
|
||||
* algorithm here, titlebars are expectedly much bigger. Just subtract a couple
|
||||
* pixels to get a proper feel. */
|
||||
if (type != META_FRAME_TYPE_ATTACHED)
|
||||
if (!(flags & META_FRAME_CONSTRAINED_TOP_EDGE) && type != META_FRAME_TYPE_ATTACHED)
|
||||
borders->invisible.top = MAX (borders->invisible.top, draggable_borders - 2);
|
||||
|
||||
if (!(flags & META_FRAME_CONSTRAINED_BOTTOM_EDGE))
|
||||
borders->invisible.bottom = MAX (borders->invisible.bottom,
|
||||
draggable_borders - borders->visible.bottom);
|
||||
}
|
||||
|
||||
borders->total.left = borders->invisible.left + borders->visible.left;
|
||||
@@ -992,7 +995,6 @@ create_style_context (GType widget_type,
|
||||
...)
|
||||
{
|
||||
GtkStyleContext *style;
|
||||
GtkStateFlags state;
|
||||
GtkWidgetPath *path;
|
||||
const char *name;
|
||||
va_list ap;
|
||||
@@ -1011,19 +1013,6 @@ 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);
|
||||
|
@@ -134,19 +134,12 @@ 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, &error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
meta_warning ("Failed to set texture region: %s\n", error->message);
|
||||
cogl_error_free (error);
|
||||
}
|
||||
rect.x, rect.y, 0, NULL);
|
||||
}
|
||||
|
||||
wl_shm_buffer_end_access (shm_buffer);
|
||||
|
@@ -1424,10 +1424,9 @@ meta_wayland_drag_dest_focus_out (MetaWaylandDataDevice *data_device,
|
||||
{
|
||||
MetaWaylandDragGrab *grab = data_device->current_grab;
|
||||
|
||||
if (!grab->drag_focus_data_device)
|
||||
return;
|
||||
if (grab->drag_focus_data_device)
|
||||
wl_data_device_send_leave (grab->drag_focus_data_device);
|
||||
|
||||
wl_data_device_send_leave (grab->drag_focus_data_device);
|
||||
wl_list_remove (&grab->drag_focus_listener.link);
|
||||
grab->drag_focus_data_device = NULL;
|
||||
}
|
||||
@@ -1440,9 +1439,6 @@ 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);
|
||||
@@ -1457,9 +1453,6 @@ 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);
|
||||
}
|
||||
|
||||
|
@@ -58,7 +58,6 @@
|
||||
#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"
|
||||
@@ -280,66 +279,14 @@ 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))
|
||||
@@ -347,7 +294,14 @@ meta_wayland_keyboard_broadcast_modifiers (MetaWaylandKeyboard *keyboard)
|
||||
uint32_t serial = wl_display_next_serial (keyboard->display);
|
||||
|
||||
wl_resource_for_each (resource, l)
|
||||
keyboard_send_modifiers (keyboard, resource, serial);
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,13 +509,6 @@ 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);
|
||||
@@ -655,6 +602,7 @@ 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
|
||||
@@ -674,7 +622,11 @@ broadcast_focus (MetaWaylandKeyboard *keyboard,
|
||||
*/
|
||||
wl_array_init (&fake_keys);
|
||||
|
||||
keyboard_send_modifiers (keyboard, resource, keyboard->focus_serial);
|
||||
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));
|
||||
wl_keyboard_send_enter (resource, keyboard->focus_serial,
|
||||
keyboard->focus_surface->resource,
|
||||
&fake_keys);
|
||||
|
@@ -1138,7 +1138,8 @@ meta_wayland_pointer_can_grab_surface (MetaWaylandPointer *pointer,
|
||||
MetaWaylandSurface *surface,
|
||||
uint32_t serial)
|
||||
{
|
||||
return (pointer->grab_serial == serial &&
|
||||
return (pointer->button_count > 0 &&
|
||||
pointer->grab_serial == serial &&
|
||||
pointer->focus_surface == surface);
|
||||
}
|
||||
|
||||
|
@@ -374,11 +374,10 @@ meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
|
||||
|
||||
gboolean
|
||||
meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
MetaWaylandSurface *surface,
|
||||
uint32_t serial,
|
||||
gboolean require_pressed,
|
||||
gfloat *x,
|
||||
gfloat *y)
|
||||
MetaWaylandSurface *surface,
|
||||
uint32_t serial,
|
||||
gfloat *x,
|
||||
gfloat *y)
|
||||
{
|
||||
ClutterEventSequence *sequence = NULL;
|
||||
gboolean can_grab_surface = FALSE;
|
||||
@@ -392,8 +391,7 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0 &&
|
||||
(!require_pressed || seat->pointer.button_count > 0))
|
||||
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0)
|
||||
can_grab_surface = meta_wayland_pointer_can_grab_surface (&seat->pointer, surface, serial);
|
||||
|
||||
if (can_grab_surface)
|
||||
|
@@ -60,11 +60,10 @@ 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,
|
||||
gboolean require_pressed,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
MetaWaylandSurface *surface,
|
||||
uint32_t serial,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
|
||||
uint32_t serial);
|
||||
|
||||
|
@@ -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, FALSE, NULL, NULL))
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, NULL, NULL))
|
||||
return;
|
||||
|
||||
meta_window_show_menu (surface->window, META_WINDOW_MENU_WM,
|
||||
@@ -1382,15 +1382,12 @@ 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 */
|
||||
TRUE, /* frame_action */
|
||||
FALSE, /* frame_action */
|
||||
1, /* button. XXX? */
|
||||
0, /* modmask */
|
||||
meta_display_get_current_time_roundtrip (window->display),
|
||||
@@ -1407,7 +1404,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, TRUE, &x, &y))
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
|
||||
return;
|
||||
|
||||
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
|
||||
@@ -1447,7 +1444,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, TRUE, &x, &y))
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
|
||||
return;
|
||||
|
||||
begin_grab_op_on_surface (surface, seat, grab_op_for_xdg_surface_resize_edge (edges), x, y);
|
||||
@@ -1790,7 +1787,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, TRUE, &x, &y))
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
|
||||
return;
|
||||
|
||||
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
|
||||
@@ -1830,7 +1827,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, TRUE, &x, &y))
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
|
||||
return;
|
||||
|
||||
begin_grab_op_on_surface (surface, seat, grab_op_for_wl_shell_surface_resize_edge (edges), x, y);
|
||||
|
@@ -363,7 +363,9 @@ meta_window_wayland_main_monitor_changed (MetaWindow *window,
|
||||
/* Window size. */
|
||||
scale_rect_size (&window->rect, scale_factor);
|
||||
scale_rect_size (&window->unconstrained_rect, scale_factor);
|
||||
scale_rect_size (&window->saved_rect, scale_factor);
|
||||
scale_rect_size (&window->size_states.normal.rect, scale_factor);
|
||||
scale_rect_size (&window->size_states.tiled.rect, scale_factor);
|
||||
scale_rect_size (&window->size_states.maximized.rect, scale_factor);
|
||||
|
||||
/* Window geometry offset (XXX: Need a better place, see
|
||||
* meta_window_wayland_move_resize). */
|
||||
|
@@ -965,10 +965,10 @@ save_state (void)
|
||||
{
|
||||
fprintf (outfile,
|
||||
" <maximized saved_x=\"%d\" saved_y=\"%d\" saved_width=\"%d\" saved_height=\"%d\"/>\n",
|
||||
window->saved_rect.x,
|
||||
window->saved_rect.y,
|
||||
window->saved_rect.width,
|
||||
window->saved_rect.height);
|
||||
window->size_states.normal.rect.x,
|
||||
window->size_states.normal.rect.y,
|
||||
window->size_states.normal.rect.width,
|
||||
window->size_states.normal.rect.height);
|
||||
}
|
||||
|
||||
/* Gravity */
|
||||
|
@@ -413,10 +413,10 @@ meta_window_apply_session_info (MetaWindow *window,
|
||||
info->saved_rect.height,
|
||||
window->desc);
|
||||
|
||||
window->saved_rect.x = info->saved_rect.x;
|
||||
window->saved_rect.y = info->saved_rect.y;
|
||||
window->saved_rect.width = info->saved_rect.width;
|
||||
window->saved_rect.height = info->saved_rect.height;
|
||||
window->size_states.normal.rect.x = info->saved_rect.x;
|
||||
window->size_states.normal.rect.y = info->saved_rect.y;
|
||||
window->size_states.normal.rect.width = info->saved_rect.width;
|
||||
window->size_states.normal.rect.height = info->saved_rect.height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user