Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f0e2e238f3 | ||
![]() |
0c48a2633f | ||
![]() |
26a18e8312 | ||
![]() |
2ea121a186 | ||
![]() |
958cdd5117 | ||
![]() |
58d2bd0581 | ||
![]() |
e5067368f5 | ||
![]() |
c89918a339 | ||
![]() |
15b5e6717f | ||
![]() |
3b977f18b3 | ||
![]() |
233c148c16 | ||
![]() |
8c561a9075 | ||
![]() |
eb1df05570 | ||
![]() |
ffa8c0039d | ||
![]() |
379044c069 | ||
![]() |
c5f40f7481 | ||
![]() |
c9b0d04503 | ||
![]() |
0d41399fed | ||
![]() |
5d695c674e | ||
![]() |
7717725270 | ||
![]() |
6542ef2970 | ||
![]() |
83d19c8ae2 |
24
NEWS
24
NEWS
@@ -1,26 +1,22 @@
|
||||
3.19.2
|
||||
3.18.3
|
||||
======
|
||||
* Fix crash on monitor unplug [Rui; #756796]
|
||||
* Exit cleanly on initialization errors [Owen; #757311]
|
||||
* Allow to determine backend setting from session type [Ray; #741666]
|
||||
* Fix DRM device detection for non-PCI devices [Alban; #754911]
|
||||
* Don't force placement of windows without buffer on wayland [Marek; #751887]
|
||||
* Fix initialization of bypass compositor hint [Rui; #758544]
|
||||
* Fix crash when initial cursor position is not on a monitor [Marek; #756698]
|
||||
* Fix crash when more CRTs are enabled than outputs connected [Rui; #751638]
|
||||
* Fix crash during XWayland initialization [Marek; #751845]
|
||||
* Ensure to send a ConfigureNotify to just mapped windows [Rui; #759492]
|
||||
|
||||
Contributors:
|
||||
Alban Browaeys, Marek Chalupa, Rui Matos, Florian Müllner, Ray Strode,
|
||||
Owen W. Taylor
|
||||
Marek Chalupa, Rui Matos, Jasper St. Pierre
|
||||
|
||||
3.19.1
|
||||
3.18.2
|
||||
======
|
||||
* wayland: Allow to trigger popups through keyboard/touch [Carlos; #756296]
|
||||
* Misc. crash fixes [Jonas, Rui; #756675, #756660, #757148, #756796]
|
||||
* Fix modifiers-only input source switching on Ubuntu [Alberts; #756543]
|
||||
* Misc. bug fixes [Jonas, Rui, Giovanni, Florian; #756675, #756660, #746420,
|
||||
#756548, #756796, #757101, #757148]
|
||||
* Exit cleanly on initialization errors [Owen; #757311]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Giovanni Campagna, Carlos Garnacho, Rui Matos,
|
||||
Alberts Muktupāvels, Florian Müllner
|
||||
Jonas Ådahl, Rui Matos, Alberts Muktupāvels, Florian Müllner, Owen W. Taylor
|
||||
|
||||
Translations:
|
||||
Daniel Șerbănescu [ro]
|
||||
|
@@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [19])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
m4_define([mutter_minor_version], [18])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@@ -58,7 +58,7 @@ CANBERRA_GTK_VERSION=0.26
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
|
||||
MUTTER_PC_MODULES="
|
||||
gtk+-3.0 >= 3.19.1
|
||||
gtk+-3.0 >= 3.9.11
|
||||
gio-unix-2.0 >= 2.35.1
|
||||
pango >= 1.2.0
|
||||
cairo >= 1.10.0
|
||||
|
@@ -1,5 +1,6 @@
|
||||
desktopfiles_in_files = \
|
||||
mutter.desktop.in
|
||||
mutter.desktop.in \
|
||||
mutter-wayland.desktop.in
|
||||
desktopfilesdir = $(datadir)/applications
|
||||
desktopfiles_DATA = $(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
|
||||
|
17
data/mutter-wayland.desktop.in
Normal file
17
data/mutter-wayland.desktop.in
Normal file
@@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
_Name=Mutter (wayland compositor)
|
||||
Exec=mutter --wayland --display-server
|
||||
NoDisplay=true
|
||||
# name of loadable control center module
|
||||
X-GNOME-WMSettingsModule=metacity
|
||||
# name we put on the WM spec check window
|
||||
X-GNOME-WMName=Mutter
|
||||
# back compat only
|
||||
X-GnomeWMSettingsLibrary=metacity
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=mutter
|
||||
X-GNOME-Bugzilla-Component=general
|
||||
X-GNOME-Autostart-Phase=WindowManager
|
||||
X-GNOME-Provides=windowmanager
|
||||
X-GNOME-Autostart-Notify=true
|
@@ -1,2 +1 @@
|
||||
# List of source files that should NOT be translated.
|
||||
# Please keep this file sorted alphabetically.
|
||||
data/mutter-wayland.desktop.in
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#include "meta-cursor-renderer.h"
|
||||
|
||||
#include <meta/meta-backend.h>
|
||||
#include <backends/meta-backend-private.h>
|
||||
#include <backends/meta-monitor-manager-private.h>
|
||||
#include <meta/util.h>
|
||||
|
||||
#include <cogl/cogl.h>
|
||||
@@ -116,6 +118,14 @@ meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
|
||||
};
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_cursor_in_monitors_area (int x, int y)
|
||||
{
|
||||
MetaMonitorManager *monitor_manager = meta_backend_get_monitor_manager (meta_get_backend ());
|
||||
return meta_monitor_manager_get_monitor_at_point (monitor_manager,
|
||||
(gfloat) x, (gfloat) y) >= 0;
|
||||
}
|
||||
|
||||
static void
|
||||
update_cursor (MetaCursorRenderer *renderer,
|
||||
MetaCursorSprite *cursor_sprite)
|
||||
@@ -124,6 +134,11 @@ update_cursor (MetaCursorRenderer *renderer,
|
||||
gboolean handled_by_backend;
|
||||
gboolean should_redraw = FALSE;
|
||||
|
||||
/* do not render cursor if it is not on any monitor. Such situation
|
||||
* can occur e. g. after monitor hot-plug */
|
||||
if (!is_cursor_in_monitors_area (priv->current_x, priv->current_y))
|
||||
return;
|
||||
|
||||
if (cursor_sprite)
|
||||
meta_cursor_sprite_prepare_at (cursor_sprite,
|
||||
priv->current_x,
|
||||
|
@@ -178,7 +178,7 @@ make_logical_config (MetaMonitorManager *manager)
|
||||
unsigned int i, j;
|
||||
|
||||
monitor_infos = g_array_sized_new (FALSE, TRUE, sizeof (MetaMonitorInfo),
|
||||
manager->n_outputs);
|
||||
manager->n_crtcs);
|
||||
|
||||
/* Walk the list of MetaCRTCs, and build a MetaMonitorInfo
|
||||
for each of them, unless they reference a rectangle that
|
||||
|
@@ -295,9 +295,9 @@ get_primary_gpu_path (const gchar *seat_name)
|
||||
if (!devices)
|
||||
goto out;
|
||||
|
||||
for (tmp = devices; tmp != NULL && path == NULL; tmp = tmp->next)
|
||||
for (tmp = devices; tmp != NULL; tmp = tmp->next)
|
||||
{
|
||||
GUdevDevice *platform_device = NULL, *pci_device = NULL;
|
||||
GUdevDevice *pci_device;
|
||||
GUdevDevice *dev = tmp->data;
|
||||
gint boot_vga;
|
||||
const gchar *device_seat;
|
||||
@@ -324,26 +324,20 @@ get_primary_gpu_path (const gchar *seat_name)
|
||||
if (g_strcmp0 (seat_name, device_seat))
|
||||
continue;
|
||||
|
||||
platform_device = g_udev_device_get_parent_with_subsystem (dev, "platform", NULL);
|
||||
pci_device = g_udev_device_get_parent_with_subsystem (dev, "pci", NULL);
|
||||
if (!pci_device)
|
||||
continue;
|
||||
|
||||
if (platform_device != NULL)
|
||||
{
|
||||
path = g_strdup (g_udev_device_get_device_file (dev));
|
||||
}
|
||||
else if (pci_device != NULL)
|
||||
{
|
||||
/* get value of boot_vga attribute or 0 if the device has no boot_vga */
|
||||
boot_vga = g_udev_device_get_sysfs_attr_as_int (pci_device, "boot_vga");
|
||||
if (boot_vga == 1)
|
||||
{
|
||||
/* found the boot_vga device */
|
||||
path = g_strdup (g_udev_device_get_device_file (dev));
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (platform_device);
|
||||
/* get value of boot_vga attribute or 0 if the device has no boot_vga */
|
||||
boot_vga = g_udev_device_get_sysfs_attr_as_int (pci_device, "boot_vga");
|
||||
g_object_unref (pci_device);
|
||||
|
||||
if (boot_vga == 1)
|
||||
{
|
||||
/* found the boot_vga device */
|
||||
path = g_strdup (g_udev_device_get_device_file (dev));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free_full (devices, g_object_unref);
|
||||
|
104
src/core/main.c
104
src/core/main.c
@@ -80,10 +80,6 @@
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "wayland/meta-wayland.h"
|
||||
# endif
|
||||
|
||||
#if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND)
|
||||
#include <systemd/sd-login.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -295,95 +291,6 @@ on_sigterm (gpointer user_data)
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WAYLAND) && defined(HAVE_NATIVE_BACKEND)
|
||||
static char *
|
||||
find_logind_session_type (void)
|
||||
{
|
||||
char **sessions;
|
||||
char *session_id;
|
||||
char *session_type;
|
||||
int ret, i;
|
||||
|
||||
ret = sd_pid_get_session (0, &session_id);
|
||||
|
||||
if (ret == 0 && session_id != NULL)
|
||||
{
|
||||
ret = sd_session_get_type (session_id, &session_type);
|
||||
free (session_id);
|
||||
|
||||
if (ret < 0)
|
||||
session_type = NULL;
|
||||
|
||||
goto out;
|
||||
}
|
||||
session_type = NULL;
|
||||
|
||||
ret = sd_uid_get_sessions (getuid (), TRUE, &sessions);
|
||||
|
||||
if (ret < 0 || sessions == NULL)
|
||||
goto out;
|
||||
|
||||
for (i = 0; sessions[i] != NULL; i++)
|
||||
{
|
||||
ret = sd_session_get_type (sessions[i], &session_type);
|
||||
|
||||
if (ret < 0)
|
||||
continue;
|
||||
|
||||
if (g_strcmp0 (session_type, "x11") == 0||
|
||||
g_strcmp0 (session_type, "wayland") == 0)
|
||||
break;
|
||||
|
||||
g_clear_pointer (&session_type, (GDestroyNotify) free);
|
||||
}
|
||||
|
||||
for (i = 0; sessions[i] != NULL; i++)
|
||||
free (sessions[i]);
|
||||
free (sessions);
|
||||
|
||||
out:
|
||||
return session_type;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_for_wayland_session_type (void)
|
||||
{
|
||||
char *session_type = NULL;
|
||||
gboolean is_wayland = FALSE;
|
||||
|
||||
session_type = find_logind_session_type ();
|
||||
|
||||
if (session_type != NULL)
|
||||
{
|
||||
is_wayland = g_strcmp0 (session_type, "wayland") == 0;
|
||||
free (session_type);
|
||||
}
|
||||
|
||||
return is_wayland;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_backend (void)
|
||||
{
|
||||
gboolean session_type_is_wayland = FALSE;
|
||||
|
||||
#if defined(HAVE_WAYLAND) && defined(HAVE_NATIVE_BACKEND)
|
||||
session_type_is_wayland = check_for_wayland_session_type ();
|
||||
#endif
|
||||
|
||||
#if defined(CLUTTER_WINDOWING_EGL) && defined(HAVE_NATIVE_BACKEND)
|
||||
if (opt_display_server || session_type_is_wayland)
|
||||
clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
|
||||
else
|
||||
#endif
|
||||
clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
meta_set_is_wayland_compositor (opt_wayland || session_type_is_wayland);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_init: (skip)
|
||||
*
|
||||
@@ -416,7 +323,16 @@ meta_init (void)
|
||||
if (g_getenv ("MUTTER_DEBUG"))
|
||||
meta_set_debugging (TRUE);
|
||||
|
||||
init_backend ();
|
||||
#if defined(CLUTTER_WINDOWING_EGL) && defined(HAVE_NATIVE_BACKEND)
|
||||
if (opt_display_server)
|
||||
clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
|
||||
else
|
||||
#endif
|
||||
clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
meta_set_is_wayland_compositor (opt_wayland);
|
||||
#endif
|
||||
|
||||
if (g_get_home_dir ())
|
||||
if (chdir (g_get_home_dir ()) < 0)
|
||||
|
@@ -1477,11 +1477,42 @@ button_function_from_string (const char *str)
|
||||
return META_BUTTON_FUNCTION_MAXIMIZE;
|
||||
else if (strcmp (str, "close") == 0)
|
||||
return META_BUTTON_FUNCTION_CLOSE;
|
||||
else if (strcmp (str, "shade") == 0)
|
||||
return META_BUTTON_FUNCTION_SHADE;
|
||||
else if (strcmp (str, "above") == 0)
|
||||
return META_BUTTON_FUNCTION_ABOVE;
|
||||
else if (strcmp (str, "stick") == 0)
|
||||
return META_BUTTON_FUNCTION_STICK;
|
||||
else
|
||||
/* don't know; give up */
|
||||
return META_BUTTON_FUNCTION_LAST;
|
||||
}
|
||||
|
||||
static MetaButtonFunction
|
||||
button_opposite_function (MetaButtonFunction ofwhat)
|
||||
{
|
||||
switch (ofwhat)
|
||||
{
|
||||
case META_BUTTON_FUNCTION_SHADE:
|
||||
return META_BUTTON_FUNCTION_UNSHADE;
|
||||
case META_BUTTON_FUNCTION_UNSHADE:
|
||||
return META_BUTTON_FUNCTION_SHADE;
|
||||
|
||||
case META_BUTTON_FUNCTION_ABOVE:
|
||||
return META_BUTTON_FUNCTION_UNABOVE;
|
||||
case META_BUTTON_FUNCTION_UNABOVE:
|
||||
return META_BUTTON_FUNCTION_ABOVE;
|
||||
|
||||
case META_BUTTON_FUNCTION_STICK:
|
||||
return META_BUTTON_FUNCTION_UNSTICK;
|
||||
case META_BUTTON_FUNCTION_UNSTICK:
|
||||
return META_BUTTON_FUNCTION_STICK;
|
||||
|
||||
default:
|
||||
return META_BUTTON_FUNCTION_LAST;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_layout_handler (GVariant *value,
|
||||
gpointer *result,
|
||||
@@ -1525,6 +1556,12 @@ button_layout_handler (GVariant *value,
|
||||
if (i > 0 && strcmp("spacer", buttons[b]) == 0)
|
||||
{
|
||||
new_layout.left_buttons_has_spacer[i-1] = TRUE;
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
{
|
||||
new_layout.left_buttons_has_spacer[i-2] = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1533,6 +1570,11 @@ button_layout_handler (GVariant *value,
|
||||
new_layout.left_buttons[i] = f;
|
||||
used[f] = TRUE;
|
||||
++i;
|
||||
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
new_layout.left_buttons[i++] = f;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1576,6 +1618,11 @@ button_layout_handler (GVariant *value,
|
||||
if (i > 0 && strcmp("spacer", buttons[b]) == 0)
|
||||
{
|
||||
new_layout.right_buttons_has_spacer[i-1] = TRUE;
|
||||
f = button_opposite_function (f);
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
{
|
||||
new_layout.right_buttons_has_spacer[i-2] = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1584,6 +1631,12 @@ button_layout_handler (GVariant *value,
|
||||
new_layout.right_buttons[i] = f;
|
||||
used[f] = TRUE;
|
||||
++i;
|
||||
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
new_layout.right_buttons[i++] = f;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -1579,10 +1579,8 @@ implement_showing (MetaWindow *window,
|
||||
* windows we might want to know where they are on the screen,
|
||||
* so we should place the window even if we're hiding it rather
|
||||
* than showing it.
|
||||
* Force placing windows only when they should be already mapped,
|
||||
* see #751887
|
||||
*/
|
||||
if (!window->placed && client_window_should_be_mapped (window))
|
||||
if (!window->placed)
|
||||
meta_window_force_placement (window);
|
||||
|
||||
meta_window_hide (window);
|
||||
|
@@ -372,6 +372,12 @@ typedef enum
|
||||
* @META_BUTTON_FUNCTION_MINIMIZE: Minimize
|
||||
* @META_BUTTON_FUNCTION_MAXIMIZE: Maximize
|
||||
* @META_BUTTON_FUNCTION_CLOSE: Close
|
||||
* @META_BUTTON_FUNCTION_SHADE: Shade
|
||||
* @META_BUTTON_FUNCTION_ABOVE: Above
|
||||
* @META_BUTTON_FUNCTION_STICK: Stick
|
||||
* @META_BUTTON_FUNCTION_UNSHADE: Unshade
|
||||
* @META_BUTTON_FUNCTION_UNABOVE: Unabove
|
||||
* @META_BUTTON_FUNCTION_UNSTICK: Unstick
|
||||
* @META_BUTTON_FUNCTION_LAST: Marks the end of the #MetaButtonFunction enumeration
|
||||
*
|
||||
* Function a window button can have. Note, you can't add stuff here
|
||||
@@ -384,6 +390,12 @@ typedef enum
|
||||
META_BUTTON_FUNCTION_MINIMIZE,
|
||||
META_BUTTON_FUNCTION_MAXIMIZE,
|
||||
META_BUTTON_FUNCTION_CLOSE,
|
||||
META_BUTTON_FUNCTION_SHADE,
|
||||
META_BUTTON_FUNCTION_ABOVE,
|
||||
META_BUTTON_FUNCTION_STICK,
|
||||
META_BUTTON_FUNCTION_UNSHADE,
|
||||
META_BUTTON_FUNCTION_UNABOVE,
|
||||
META_BUTTON_FUNCTION_UNSTICK,
|
||||
META_BUTTON_FUNCTION_APPMENU,
|
||||
META_BUTTON_FUNCTION_LAST
|
||||
} MetaButtonFunction;
|
||||
@@ -393,10 +405,10 @@ typedef enum
|
||||
/* Keep array size in sync with MAX_BUTTONS_PER_CORNER */
|
||||
/**
|
||||
* MetaButtonLayout:
|
||||
* @left_buttons: (array fixed-size=5):
|
||||
* @right_buttons: (array fixed-size=5):
|
||||
* @left_buttons_has_spacer: (array fixed-size=5):
|
||||
* @right_buttons_has_spacer: (array fixed-size=5):
|
||||
* @left_buttons: (array fixed-size=11):
|
||||
* @right_buttons: (array fixed-size=11):
|
||||
* @left_buttons_has_spacer: (array fixed-size=11):
|
||||
* @right_buttons_has_spacer: (array fixed-size=11):
|
||||
*/
|
||||
typedef struct _MetaButtonLayout MetaButtonLayout;
|
||||
struct _MetaButtonLayout
|
||||
|
108
src/ui/frames.c
108
src/ui/frames.c
@@ -970,6 +970,12 @@ meta_frame_left_click_event (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
case META_FRAME_CONTROL_APPMENU:
|
||||
frame->grab_button = event->button;
|
||||
@@ -1148,6 +1154,24 @@ handle_button_release_event (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
meta_window_delete (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
meta_window_shade (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
meta_window_unshade (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
meta_window_make_above (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
meta_window_unmake_above (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
meta_window_stick (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
meta_window_unstick (frame->meta_window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1196,6 +1220,18 @@ meta_ui_frame_update_prelit_control (MetaUIFrame *frame,
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
cursor = META_CURSOR_SE_RESIZE;
|
||||
break;
|
||||
@@ -1234,6 +1270,12 @@ meta_ui_frame_update_prelit_control (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
/* leave control set */
|
||||
break;
|
||||
@@ -1445,6 +1487,24 @@ meta_ui_frame_paint (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
button_type = META_BUTTON_TYPE_MAXIMIZE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
button_type = META_BUTTON_TYPE_SHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
button_type = META_BUTTON_TYPE_UNSHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
button_type = META_BUTTON_TYPE_ABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
button_type = META_BUTTON_TYPE_UNABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
button_type = META_BUTTON_TYPE_STICK;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
button_type = META_BUTTON_TYPE_UNSTICK;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
button_type = META_BUTTON_TYPE_CLOSE;
|
||||
break;
|
||||
@@ -1564,6 +1624,24 @@ control_rect (MetaFrameControl control,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
rect = &fgeom->max_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
rect = &fgeom->shade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
rect = &fgeom->unshade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
rect = &fgeom->above_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
rect = &fgeom->unabove_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
rect = &fgeom->stick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
rect = &fgeom->unstick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_S:
|
||||
@@ -1648,6 +1726,36 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
|
||||
return META_FRAME_CONTROL_MAXIMIZE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_SHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.above_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_ABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.stick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_STICK;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSTICK;
|
||||
}
|
||||
|
||||
/* South resize always has priority over north resize,
|
||||
* in case of overlap.
|
||||
*/
|
||||
|
@@ -39,6 +39,12 @@ typedef enum
|
||||
META_FRAME_CONTROL_MINIMIZE,
|
||||
META_FRAME_CONTROL_MAXIMIZE,
|
||||
META_FRAME_CONTROL_UNMAXIMIZE,
|
||||
META_FRAME_CONTROL_SHADE,
|
||||
META_FRAME_CONTROL_UNSHADE,
|
||||
META_FRAME_CONTROL_ABOVE,
|
||||
META_FRAME_CONTROL_UNABOVE,
|
||||
META_FRAME_CONTROL_STICK,
|
||||
META_FRAME_CONTROL_UNSTICK,
|
||||
META_FRAME_CONTROL_RESIZE_SE,
|
||||
META_FRAME_CONTROL_RESIZE_S,
|
||||
META_FRAME_CONTROL_RESIZE_SW,
|
||||
|
@@ -115,7 +115,7 @@ struct _MetaFrameGeometry
|
||||
|
||||
/* used for a memset hack */
|
||||
#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, appmenu_rect) + sizeof (MetaButtonSpace) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, unstick_rect) + sizeof (MetaButtonSpace) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
|
||||
/* The button rects (if changed adjust memset hack) */
|
||||
MetaButtonSpace close_rect;
|
||||
@@ -123,6 +123,12 @@ struct _MetaFrameGeometry
|
||||
MetaButtonSpace min_rect;
|
||||
MetaButtonSpace menu_rect;
|
||||
MetaButtonSpace appmenu_rect;
|
||||
MetaButtonSpace shade_rect;
|
||||
MetaButtonSpace above_rect;
|
||||
MetaButtonSpace stick_rect;
|
||||
MetaButtonSpace unshade_rect;
|
||||
MetaButtonSpace unabove_rect;
|
||||
MetaButtonSpace unstick_rect;
|
||||
/* End of button rects (if changed adjust memset hack) */
|
||||
|
||||
/* Saved button layout */
|
||||
@@ -152,6 +158,12 @@ typedef enum
|
||||
META_BUTTON_TYPE_MINIMIZE,
|
||||
META_BUTTON_TYPE_MENU,
|
||||
META_BUTTON_TYPE_APPMENU,
|
||||
META_BUTTON_TYPE_SHADE,
|
||||
META_BUTTON_TYPE_ABOVE,
|
||||
META_BUTTON_TYPE_STICK,
|
||||
META_BUTTON_TYPE_UNSHADE,
|
||||
META_BUTTON_TYPE_UNABOVE,
|
||||
META_BUTTON_TYPE_UNSTICK,
|
||||
META_BUTTON_TYPE_LAST
|
||||
} MetaButtonType;
|
||||
|
||||
|
@@ -177,6 +177,17 @@ rect_for_function (MetaFrameGeometry *fgeom,
|
||||
return &fgeom->close_rect;
|
||||
else
|
||||
return NULL;
|
||||
case META_BUTTON_FUNCTION_STICK:
|
||||
case META_BUTTON_FUNCTION_SHADE:
|
||||
case META_BUTTON_FUNCTION_ABOVE:
|
||||
case META_BUTTON_FUNCTION_UNSTICK:
|
||||
case META_BUTTON_FUNCTION_UNSHADE:
|
||||
case META_BUTTON_FUNCTION_UNABOVE:
|
||||
/* Fringe buttons that used to be supported by theme versions >v1;
|
||||
* if we want to support them again, we need to return the
|
||||
* correspondings rects here
|
||||
*/
|
||||
return NULL;
|
||||
|
||||
case META_BUTTON_FUNCTION_LAST:
|
||||
return NULL;
|
||||
@@ -446,10 +457,22 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
|
||||
}
|
||||
|
||||
/* Otherwise we need to shave out a button. Shave
|
||||
* min, max, close, then menu (menu is most useful);
|
||||
* above, stick, shade, min, max, close, then menu (menu is most useful);
|
||||
* prefer the default button locations.
|
||||
*/
|
||||
if (strip_button (left_func_rects, &n_left, &fgeom->min_rect))
|
||||
if (strip_button (left_func_rects, &n_left, &fgeom->above_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->above_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->stick_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->stick_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->shade_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->shade_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->min_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->min_rect))
|
||||
continue;
|
||||
@@ -620,6 +643,30 @@ get_button_rect (MetaButtonType type,
|
||||
*rect = fgeom->close_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_SHADE:
|
||||
*rect = fgeom->shade_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNSHADE:
|
||||
*rect = fgeom->unshade_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_ABOVE:
|
||||
*rect = fgeom->above_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNABOVE:
|
||||
*rect = fgeom->unabove_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_STICK:
|
||||
*rect = fgeom->stick_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNSTICK:
|
||||
*rect = fgeom->unstick_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_MAXIMIZE:
|
||||
*rect = fgeom->max_rect.visible;
|
||||
break;
|
||||
@@ -843,7 +890,6 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
|
||||
cairo_restore (cr);
|
||||
if (button_class)
|
||||
gtk_style_context_remove_class (style, button_class);
|
||||
gtk_style_context_set_state (style, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -929,7 +975,6 @@ static GtkStyleContext *
|
||||
create_style_context (GType widget_type,
|
||||
GtkStyleContext *parent_style,
|
||||
GtkCssProvider *provider,
|
||||
const char *object_name,
|
||||
const char *first_class,
|
||||
...)
|
||||
{
|
||||
@@ -949,9 +994,6 @@ create_style_context (GType widget_type,
|
||||
|
||||
gtk_widget_path_append_type (path, widget_type);
|
||||
|
||||
if (object_name)
|
||||
gtk_widget_path_iter_set_object_name (path, -1, object_name);
|
||||
|
||||
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);
|
||||
@@ -991,7 +1033,6 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (META_TYPE_FRAMES,
|
||||
NULL,
|
||||
provider,
|
||||
"decoration",
|
||||
GTK_STYLE_CLASS_BACKGROUND,
|
||||
"window-frame",
|
||||
"ssd",
|
||||
@@ -1000,30 +1041,28 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (GTK_TYPE_HEADER_BAR,
|
||||
style_info->styles[META_STYLE_ELEMENT_FRAME],
|
||||
provider,
|
||||
"headerbar",
|
||||
GTK_STYLE_CLASS_TITLEBAR,
|
||||
GTK_STYLE_CLASS_HORIZONTAL,
|
||||
"default-decoration",
|
||||
"header-bar",
|
||||
NULL);
|
||||
style_info->styles[META_STYLE_ELEMENT_TITLE] =
|
||||
create_style_context (GTK_TYPE_LABEL,
|
||||
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
|
||||
provider,
|
||||
"label",
|
||||
GTK_STYLE_CLASS_TITLE,
|
||||
NULL);
|
||||
style_info->styles[META_STYLE_ELEMENT_BUTTON] =
|
||||
create_style_context (GTK_TYPE_BUTTON,
|
||||
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
|
||||
provider,
|
||||
"button",
|
||||
GTK_STYLE_CLASS_BUTTON,
|
||||
"titlebutton",
|
||||
NULL);
|
||||
style_info->styles[META_STYLE_ELEMENT_IMAGE] =
|
||||
create_style_context (GTK_TYPE_IMAGE,
|
||||
style_info->styles[META_STYLE_ELEMENT_BUTTON],
|
||||
provider,
|
||||
"image",
|
||||
NULL);
|
||||
return style_info;
|
||||
}
|
||||
@@ -1130,10 +1169,9 @@ meta_style_info_create_font_desc (MetaStyleInfo *style_info)
|
||||
{
|
||||
PangoFontDescription *font_desc;
|
||||
const PangoFontDescription *override = meta_prefs_get_titlebar_font ();
|
||||
GtkStyleContext *context = style_info->styles[META_STYLE_ELEMENT_TITLE];
|
||||
|
||||
gtk_style_context_get (context,
|
||||
gtk_style_context_get_state (context),
|
||||
gtk_style_context_get (style_info->styles[META_STYLE_ELEMENT_TITLE],
|
||||
GTK_STATE_FLAG_NORMAL,
|
||||
"font", &font_desc, NULL);
|
||||
|
||||
if (override)
|
||||
|
@@ -251,12 +251,11 @@ notify_key (MetaWaylandKeyboard *keyboard,
|
||||
{
|
||||
struct wl_client *client = wl_resource_get_client (keyboard->focus_surface->resource);
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
|
||||
keyboard->key_serial = wl_display_next_serial (display);
|
||||
uint32_t serial = wl_display_next_serial (display);
|
||||
|
||||
wl_resource_for_each (resource, l)
|
||||
{
|
||||
wl_keyboard_send_key (resource, keyboard->key_serial, time, key, state);
|
||||
wl_keyboard_send_key (resource, serial, time, key, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,10 +672,3 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr));
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
|
||||
uint32_t serial)
|
||||
{
|
||||
return keyboard->key_serial == serial;
|
||||
}
|
||||
|
@@ -68,7 +68,6 @@ struct _MetaWaylandKeyboard
|
||||
MetaWaylandSurface *focus_surface;
|
||||
struct wl_listener focus_surface_listener;
|
||||
uint32_t focus_serial;
|
||||
uint32_t key_serial;
|
||||
|
||||
MetaWaylandXkbInfo xkb_info;
|
||||
enum xkb_state_component mods_changed;
|
||||
@@ -101,7 +100,4 @@ void meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_resource *seat_resource,
|
||||
uint32_t id);
|
||||
|
||||
gboolean meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_KEYBOARD_H */
|
||||
|
@@ -405,12 +405,3 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
|
||||
return sequence || can_grab_surface;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
|
||||
uint32_t serial)
|
||||
{
|
||||
return (meta_wayland_pointer_can_popup (&seat->pointer, serial) ||
|
||||
meta_wayland_keyboard_can_popup (&seat->keyboard, serial) ||
|
||||
meta_wayland_touch_can_popup (&seat->touch, serial));
|
||||
}
|
||||
|
@@ -64,7 +64,5 @@ gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
uint32_t serial,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_SEAT_H */
|
||||
|
@@ -933,26 +933,22 @@ set_surface_is_on_output (MetaWaylandSurface *surface,
|
||||
MetaWaylandOutput *wayland_output,
|
||||
gboolean is_on_output)
|
||||
{
|
||||
gpointer orig_id;
|
||||
gboolean was_on_output = g_hash_table_lookup_extended (surface->outputs_to_destroy_notify_id,
|
||||
wayland_output,
|
||||
NULL, &orig_id);
|
||||
gboolean was_on_output = g_hash_table_contains (surface->outputs,
|
||||
wayland_output);
|
||||
|
||||
if (!was_on_output && is_on_output)
|
||||
{
|
||||
gulong id;
|
||||
|
||||
id = g_signal_connect (wayland_output, "output-destroyed",
|
||||
G_CALLBACK (surface_handle_output_destroy),
|
||||
surface);
|
||||
g_hash_table_insert (surface->outputs_to_destroy_notify_id, wayland_output,
|
||||
GSIZE_TO_POINTER ((gsize)id));
|
||||
g_signal_connect (wayland_output, "output-destroyed",
|
||||
G_CALLBACK (surface_handle_output_destroy),
|
||||
surface);
|
||||
g_hash_table_add (surface->outputs, wayland_output);
|
||||
surface_entered_output (surface, wayland_output);
|
||||
}
|
||||
else if (was_on_output && !is_on_output)
|
||||
{
|
||||
g_hash_table_remove (surface->outputs_to_destroy_notify_id, wayland_output);
|
||||
g_signal_handler_disconnect (wayland_output, (gulong) GPOINTER_TO_SIZE (orig_id));
|
||||
g_hash_table_remove (surface->outputs, wayland_output);
|
||||
g_signal_handlers_disconnect_by_func (
|
||||
wayland_output, (gpointer)surface_handle_output_destroy, surface);
|
||||
surface_left_output (surface, wayland_output);
|
||||
}
|
||||
}
|
||||
@@ -990,12 +986,6 @@ update_surface_output_state (gpointer key, gpointer value, gpointer user_data)
|
||||
set_surface_is_on_output (surface, wayland_output, is_on_output);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_output_disconnect_signal (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
g_signal_handler_disconnect (key, (gulong) GPOINTER_TO_SIZE (value));
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
|
||||
{
|
||||
@@ -1046,8 +1036,7 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
|
||||
meta_wayland_compositor_destroy_frame_callbacks (compositor, surface);
|
||||
|
||||
g_hash_table_foreach (surface->outputs_to_destroy_notify_id, surface_output_disconnect_signal, surface);
|
||||
g_hash_table_unref (surface->outputs_to_destroy_notify_id);
|
||||
g_hash_table_unref (surface->outputs);
|
||||
|
||||
wl_list_for_each_safe (cb, next, &surface->pending_frame_callback_list, link)
|
||||
wl_resource_destroy (cb->resource);
|
||||
@@ -1092,7 +1081,7 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
|
||||
sync_drag_dest_funcs (surface);
|
||||
|
||||
surface->outputs_to_destroy_notify_id = g_hash_table_new (NULL, NULL);
|
||||
surface->outputs = g_hash_table_new (NULL, NULL);
|
||||
|
||||
pending_state_init (&surface->pending);
|
||||
return surface;
|
||||
@@ -1529,7 +1518,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
||||
surface->xdg_popup = popup_resource;
|
||||
surface->xdg_shell_resource = resource;
|
||||
|
||||
if (!meta_wayland_seat_can_popup (seat, serial))
|
||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||
{
|
||||
xdg_popup_send_popup_done (popup_resource);
|
||||
return;
|
||||
@@ -1750,7 +1739,7 @@ wl_shell_surface_set_popup (struct wl_client *client,
|
||||
|
||||
wl_shell_surface_set_state (surface, SURFACE_STATE_TOPLEVEL);
|
||||
|
||||
if (!meta_wayland_seat_can_popup (seat, serial))
|
||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||
{
|
||||
wl_shell_surface_send_popup_done (resource);
|
||||
return;
|
||||
|
@@ -147,7 +147,7 @@ struct _MetaWaylandSurface
|
||||
int scale;
|
||||
int32_t offset_x, offset_y;
|
||||
GList *subsurfaces;
|
||||
GHashTable *outputs_to_destroy_notify_id;
|
||||
GHashTable *outputs;
|
||||
|
||||
/* List of pending frame callbacks that needs to stay queued longer than one
|
||||
* commit sequence, such as when it has not yet been assigned a role.
|
||||
|
@@ -575,26 +575,6 @@ meta_wayland_touch_create_new_resource (MetaWaylandTouch *touch,
|
||||
wl_list_insert (&touch->resource_list, wl_resource_get_link (cr));
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||
uint32_t serial)
|
||||
{
|
||||
MetaWaylandTouchInfo *touch_info;
|
||||
GHashTableIter iter;
|
||||
|
||||
if (!touch->touches)
|
||||
return FALSE;
|
||||
|
||||
g_hash_table_iter_init (&iter, touch->touches);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer*) &touch_info))
|
||||
{
|
||||
if (touch_info->slot_serial == serial)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ClutterEventSequence *
|
||||
meta_wayland_touch_find_grab_sequence (MetaWaylandTouch *touch,
|
||||
MetaWaylandSurface *surface,
|
||||
|
@@ -70,7 +70,4 @@ gboolean meta_wayland_touch_get_press_coords (MetaWaylandTouch *touch,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
|
||||
gboolean meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_TOUCH_H */
|
||||
|
@@ -337,13 +337,13 @@ meta_wayland_init (void)
|
||||
meta_wayland_pointer_gestures_init (compositor);
|
||||
meta_wayland_seat_init (compositor);
|
||||
|
||||
if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
|
||||
g_error ("Failed to start X Wayland");
|
||||
|
||||
compositor->display_name = wl_display_add_socket_auto (compositor->wayland_display);
|
||||
if (compositor->display_name == NULL)
|
||||
g_error ("Failed to create socket");
|
||||
|
||||
if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
|
||||
g_error ("Failed to start X Wayland");
|
||||
|
||||
set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
|
||||
set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
|
||||
}
|
||||
|
@@ -542,13 +542,10 @@ meta_window_x11_manage (MetaWindow *window)
|
||||
* For normal windows, do a full ConfigureRequest based on the
|
||||
* window hints, as that's what the ICCCM says to do.
|
||||
*/
|
||||
priv->client_rect = window->rect;
|
||||
window->buffer_rect = window->rect;
|
||||
|
||||
if (window->override_redirect)
|
||||
{
|
||||
priv->client_rect = window->rect;
|
||||
window->buffer_rect = window->rect;
|
||||
}
|
||||
else
|
||||
if (!window->override_redirect)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MetaMoveResizeFlags flags;
|
||||
@@ -863,7 +860,7 @@ meta_window_x11_grab_op_began (MetaWindow *window,
|
||||
if (window->sync_request_counter != None)
|
||||
meta_window_x11_create_sync_request_alarm (window);
|
||||
|
||||
if (window->size_hints.width_inc > 2 || window->size_hints.height_inc > 2)
|
||||
if (window->size_hints.width_inc > 1 || window->size_hints.height_inc > 1)
|
||||
{
|
||||
priv->showing_resize_popup = TRUE;
|
||||
meta_window_refresh_resize_popup (window);
|
||||
@@ -1735,9 +1732,9 @@ meta_window_x11_update_input_region (MetaWindow *window)
|
||||
region = cairo_region_create ();
|
||||
}
|
||||
else if (n_rects == 1 &&
|
||||
(rects[0].x == 0 ||
|
||||
rects[0].y == 0 ||
|
||||
rects[0].width == priv->client_rect.width ||
|
||||
(rects[0].x == 0 &&
|
||||
rects[0].y == 0 &&
|
||||
rects[0].width == priv->client_rect.width &&
|
||||
rects[0].height == priv->client_rect.height))
|
||||
{
|
||||
/* This is the bounding region case. Keep the
|
||||
|
Reference in New Issue
Block a user