Compare commits
35 Commits
3.17.92
...
wip/fullsc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88e466f8a8 | ||
|
|
377ecdb864 | ||
|
|
d7f544f42e | ||
|
|
1ab8b854df | ||
|
|
ae7aabd5de | ||
|
|
b975676c5d | ||
|
|
86d8c3954f | ||
|
|
54557f062e | ||
|
|
130807a308 | ||
|
|
e84f694668 | ||
|
|
b18542f2b6 | ||
|
|
da0aac665f | ||
|
|
8b0b0cf028 | ||
|
|
6f64d6b0aa | ||
|
|
ebeca983c7 | ||
|
|
cf88675807 | ||
|
|
405f1ce3d0 | ||
|
|
6190ae3873 | ||
|
|
69c267b142 | ||
|
|
9abc071283 | ||
|
|
a9df4bb81a | ||
|
|
bc9e63d3db | ||
|
|
5b5ceede2b | ||
|
|
4e63c95c02 | ||
|
|
67d3a7a2d7 | ||
|
|
bc00f118f3 | ||
|
|
5801b5518f | ||
|
|
25a796afc6 | ||
|
|
27b37407d0 | ||
|
|
e23e697043 | ||
|
|
35729e8659 | ||
|
|
dc7e665de9 | ||
|
|
2e3bfd1a11 | ||
|
|
b7aca07844 | ||
|
|
dc780d2c44 |
10
NEWS
10
NEWS
@@ -1,3 +1,13 @@
|
|||||||
|
3.18.0
|
||||||
|
======
|
||||||
|
* Misc. fixes [Florian, Jonas; #753434]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Ådahl, Florian Müllner
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Rūdolfs Mazurs [lv]
|
||||||
|
|
||||||
3.17.92
|
3.17.92
|
||||||
=======
|
=======
|
||||||
* Don't omit the background color for backgrounds that don't fill the screen
|
* Don't omit the background color for backgrounds that don't fill the screen
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
AC_PREREQ(2.62)
|
AC_PREREQ(2.62)
|
||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [17])
|
m4_define([mutter_minor_version], [18])
|
||||||
m4_define([mutter_micro_version], [92])
|
m4_define([mutter_micro_version], [0])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ struct _MetaCursorRendererClass
|
|||||||
XcursorImage *xc_image);
|
XcursorImage *xc_image);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_cursor_renderer_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
MetaCursorRenderer * meta_cursor_renderer_new (void);
|
MetaCursorRenderer * meta_cursor_renderer_new (void);
|
||||||
|
|
||||||
void meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
|
void meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ struct _MetaCursorSprite
|
|||||||
gboolean theme_dirty;
|
gboolean theme_dirty;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_cursor_sprite_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaCursorSprite, meta_cursor_sprite, G_TYPE_OBJECT)
|
G_DEFINE_TYPE (MetaCursorSprite, meta_cursor_sprite, G_TYPE_OBJECT)
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
|||||||
@@ -523,15 +523,13 @@ update_trackball_scroll_button (MetaInputSettings *input_settings,
|
|||||||
}
|
}
|
||||||
else if (!device)
|
else if (!device)
|
||||||
{
|
{
|
||||||
MetaInputSettingsPrivate *priv;
|
|
||||||
const GSList *devices;
|
const GSList *devices;
|
||||||
|
|
||||||
priv = meta_input_settings_get_instance_private (input_settings);
|
|
||||||
devices = clutter_device_manager_peek_devices (priv->device_manager);
|
devices = clutter_device_manager_peek_devices (priv->device_manager);
|
||||||
|
|
||||||
while (devices)
|
while (devices)
|
||||||
{
|
{
|
||||||
ClutterInputDevice *device = devices->data;
|
device = devices->data;
|
||||||
|
|
||||||
if (device_is_trackball (device))
|
if (device_is_trackball (device))
|
||||||
input_settings_class->set_scroll_button (input_settings, device, button);
|
input_settings_class->set_scroll_button (input_settings, device, button);
|
||||||
|
|||||||
@@ -1846,7 +1846,7 @@ crtc_assignment_assign (CrtcAssignment *assign,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MetaCRTCInfo *info = g_slice_new0 (MetaCRTCInfo);
|
info = g_slice_new0 (MetaCRTCInfo);
|
||||||
|
|
||||||
info->crtc = crtc;
|
info->crtc = crtc;
|
||||||
info->mode = mode;
|
info->mode = mode;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
|
|||||||
{
|
{
|
||||||
MetaMonitorMode *mode;
|
MetaMonitorMode *mode;
|
||||||
MetaOutput *output;
|
MetaOutput *output;
|
||||||
int i, n_outputs;
|
unsigned int j;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
mode = crtc_info->mode;
|
mode = crtc_info->mode;
|
||||||
@@ -223,10 +223,9 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
|
|||||||
screen_width = MAX (screen_width, crtc_info->x + width);
|
screen_width = MAX (screen_width, crtc_info->x + width);
|
||||||
screen_height = MAX (screen_height, crtc_info->y + height);
|
screen_height = MAX (screen_height, crtc_info->y + height);
|
||||||
|
|
||||||
n_outputs = crtc_info->outputs->len;
|
for (j = 0; j < crtc_info->outputs->len; j++)
|
||||||
for (i = 0; i < n_outputs; i++)
|
|
||||||
{
|
{
|
||||||
output = ((MetaOutput**)crtc_info->outputs->pdata)[i];
|
output = ((MetaOutput**)crtc_info->outputs->pdata)[j];
|
||||||
|
|
||||||
output->is_dirty = TRUE;
|
output->is_dirty = TRUE;
|
||||||
output->crtc = crtc;
|
output->crtc = crtc;
|
||||||
|
|||||||
@@ -884,8 +884,7 @@ meta_monitor_manager_handle_apply_configuration (MetaDBusDisplayConfig *skeleto
|
|||||||
crtc_info->y = 0;
|
crtc_info->y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform < META_MONITOR_TRANSFORM_NORMAL ||
|
if (transform > META_MONITOR_TRANSFORM_FLIPPED_270 ||
|
||||||
transform > META_MONITOR_TRANSFORM_FLIPPED_270 ||
|
|
||||||
((crtc->all_transforms & (1 << transform)) == 0))
|
((crtc->all_transforms & (1 << transform)) == 0))
|
||||||
{
|
{
|
||||||
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
|
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ report_error_and_die (const char *prefix,
|
|||||||
if (error)
|
if (error)
|
||||||
g_error ("%s: %s", prefix, error->message);
|
g_error ("%s: %s", prefix, error->message);
|
||||||
else
|
else
|
||||||
g_error (prefix);
|
g_error ("%s", prefix);
|
||||||
|
|
||||||
/* the error is not freed, but it is ok as g_error aborts the process */
|
/* the error is not freed, but it is ok as g_error aborts the process */
|
||||||
}
|
}
|
||||||
@@ -71,17 +71,26 @@ report_error_and_die (const char *prefix,
|
|||||||
static Login1Session *
|
static Login1Session *
|
||||||
get_session_proxy (GCancellable *cancellable)
|
get_session_proxy (GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
|
char *proxy_path;
|
||||||
|
char *session_id;
|
||||||
Login1Session *session_proxy;
|
Login1Session *session_proxy;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (sd_pid_get_session (getpid (), &session_id) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
|
||||||
|
|
||||||
session_proxy = login1_session_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
session_proxy = login1_session_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||||
"org.freedesktop.login1",
|
"org.freedesktop.login1",
|
||||||
"/org/freedesktop/login1/session/self",
|
proxy_path,
|
||||||
cancellable, &error);
|
cancellable, &error);
|
||||||
if (!session_proxy)
|
if (!session_proxy)
|
||||||
report_error_and_die ("Failed getting session proxy", error);
|
report_error_and_die ("Failed getting session proxy", error);
|
||||||
|
|
||||||
|
free (proxy_path);
|
||||||
|
|
||||||
return session_proxy;
|
return session_proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,12 +112,12 @@ get_seat_proxy (GCancellable *cancellable)
|
|||||||
static void
|
static void
|
||||||
session_unpause (void)
|
session_unpause (void)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend;
|
ClutterBackend *clutter_backend;
|
||||||
CoglContext *cogl_context;
|
CoglContext *cogl_context;
|
||||||
CoglDisplay *cogl_display;
|
CoglDisplay *cogl_display;
|
||||||
|
|
||||||
backend = clutter_get_default_backend ();
|
clutter_backend = clutter_get_default_backend ();
|
||||||
cogl_context = clutter_backend_get_cogl_context (backend);
|
cogl_context = clutter_backend_get_cogl_context (clutter_backend);
|
||||||
cogl_display = cogl_context_get_display (cogl_context);
|
cogl_display = cogl_context_get_display (cogl_context);
|
||||||
cogl_kms_display_queue_modes_reset (cogl_display);
|
cogl_kms_display_queue_modes_reset (cogl_display);
|
||||||
|
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ meta_backend_x11_post_init (MetaBackend *backend)
|
|||||||
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
||||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||||
int major, minor;
|
int major, minor;
|
||||||
|
gboolean has_xi = FALSE;
|
||||||
|
|
||||||
priv->xdisplay = clutter_x11_get_default_display ();
|
priv->xdisplay = clutter_x11_get_default_display ();
|
||||||
|
|
||||||
@@ -450,27 +451,23 @@ meta_backend_x11_post_init (MetaBackend *backend)
|
|||||||
!XSyncInitialize (priv->xdisplay, &major, &minor))
|
!XSyncInitialize (priv->xdisplay, &major, &minor))
|
||||||
meta_fatal ("Could not initialize XSync");
|
meta_fatal ("Could not initialize XSync");
|
||||||
|
|
||||||
{
|
if (XQueryExtension (priv->xdisplay,
|
||||||
int major = 2, minor = 3;
|
"XInputExtension",
|
||||||
gboolean has_xi = FALSE;
|
&priv->xinput_opcode,
|
||||||
|
&priv->xinput_error_base,
|
||||||
|
&priv->xinput_event_base))
|
||||||
|
{
|
||||||
|
major = 2; minor = 3;
|
||||||
|
if (XIQueryVersion (priv->xdisplay, &major, &minor) == Success)
|
||||||
|
{
|
||||||
|
int version = (major * 10) + minor;
|
||||||
|
if (version >= 22)
|
||||||
|
has_xi = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (XQueryExtension (priv->xdisplay,
|
if (!has_xi)
|
||||||
"XInputExtension",
|
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
|
||||||
&priv->xinput_opcode,
|
|
||||||
&priv->xinput_error_base,
|
|
||||||
&priv->xinput_event_base))
|
|
||||||
{
|
|
||||||
if (XIQueryVersion (priv->xdisplay, &major, &minor) == Success)
|
|
||||||
{
|
|
||||||
int version = (major * 10) + minor;
|
|
||||||
if (version >= 22)
|
|
||||||
has_xi = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!has_xi)
|
|
||||||
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We only take the passive touch grab if we are a X11 compositor */
|
/* We only take the passive touch grab if we are a X11 compositor */
|
||||||
if (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR)
|
if (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR)
|
||||||
@@ -763,6 +760,9 @@ meta_backend_x11_get_keymap (MetaBackend *backend)
|
|||||||
priv->xcb,
|
priv->xcb,
|
||||||
xkb_x11_get_core_keyboard_device_id (priv->xcb),
|
xkb_x11_get_core_keyboard_device_id (priv->xcb),
|
||||||
XKB_KEYMAP_COMPILE_NO_FLAGS);
|
XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||||
|
if (priv->keymap == NULL)
|
||||||
|
priv->keymap = xkb_keymap_new_from_names (context, NULL, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||||
|
|
||||||
xkb_context_unref (context);
|
xkb_context_unref (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -795,8 +795,6 @@ meta_backend_x11_update_screen_size (MetaBackend *backend,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
|
||||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
|
||||||
Window xwin = meta_backend_x11_get_xwindow (x11);
|
Window xwin = meta_backend_x11_get_xwindow (x11);
|
||||||
XResizeWindow (priv->xdisplay, xwin, width, height);
|
XResizeWindow (priv->xdisplay, xwin, width, height);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1133,17 +1133,16 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|||||||
if (crtc_info->mode != NULL)
|
if (crtc_info->mode != NULL)
|
||||||
{
|
{
|
||||||
MetaMonitorMode *mode;
|
MetaMonitorMode *mode;
|
||||||
g_autofree XID *outputs = NULL;
|
g_autofree XID *output_ids = NULL;
|
||||||
unsigned int j, n_outputs;
|
unsigned int j, n_output_ids;
|
||||||
int width, height;
|
|
||||||
Status ok;
|
Status ok;
|
||||||
|
|
||||||
mode = crtc_info->mode;
|
mode = crtc_info->mode;
|
||||||
|
|
||||||
n_outputs = crtc_info->outputs->len;
|
n_output_ids = crtc_info->outputs->len;
|
||||||
outputs = g_new (XID, n_outputs);
|
output_ids = g_new (XID, n_output_ids);
|
||||||
|
|
||||||
for (j = 0; j < n_outputs; j++)
|
for (j = 0; j < n_output_ids; j++)
|
||||||
{
|
{
|
||||||
MetaOutput *output;
|
MetaOutput *output;
|
||||||
|
|
||||||
@@ -1152,7 +1151,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|||||||
output->is_dirty = TRUE;
|
output->is_dirty = TRUE;
|
||||||
output->crtc = crtc;
|
output->crtc = crtc;
|
||||||
|
|
||||||
outputs[j] = output->winsys_id;
|
output_ids[j] = output->winsys_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
||||||
@@ -1162,7 +1161,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
|||||||
crtc_info->x, crtc_info->y,
|
crtc_info->x, crtc_info->y,
|
||||||
(XID)mode->mode_id,
|
(XID)mode->mode_id,
|
||||||
meta_monitor_transform_to_xrandr (crtc_info->transform),
|
meta_monitor_transform_to_xrandr (crtc_info->transform),
|
||||||
outputs, n_outputs);
|
output_ids, n_output_ids);
|
||||||
|
|
||||||
if (ok != Success)
|
if (ok != Success)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ struct _MetaCursorRendererX11Nested
|
|||||||
MetaCursorRenderer parent;
|
MetaCursorRenderer parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_cursor_renderer_x11_nested_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaCursorRendererX11Nested, meta_cursor_renderer_x11_nested,
|
G_DEFINE_TYPE (MetaCursorRendererX11Nested, meta_cursor_renderer_x11_nested,
|
||||||
META_TYPE_CURSOR_RENDERER);
|
META_TYPE_CURSOR_RENDERER);
|
||||||
|
|
||||||
|
|||||||
@@ -779,7 +779,7 @@ meta_compositor_size_change_window (MetaCompositor *compositor,
|
|||||||
MetaRectangle *old_buffer_rect)
|
MetaRectangle *old_buffer_rect)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||||
meta_window_actor_size_change (window_actor, META_SIZE_CHANGE_MAXIMIZE, old_frame_rect, old_buffer_rect);
|
meta_window_actor_size_change (window_actor, which_change, old_frame_rect, old_buffer_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -832,21 +832,23 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not add shadows to non-opaque windows; eventually we should generate
|
* Do not add shadows to non-opaque (ARGB32) windows, as we can't easily
|
||||||
* a shadow from the input shape for such windows.
|
* generate shadows for them.
|
||||||
*/
|
*/
|
||||||
if (is_non_opaque (self))
|
if (is_non_opaque (self))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add shadows to override redirect windows on X11 unless the toolkit
|
* If a window specifies that it has custom frame extents, that likely
|
||||||
* indicates that it is handling shadows itself (e.g., Gtk menus).
|
* means that it is drawing a shadow itself. Don't draw our own.
|
||||||
*/
|
*/
|
||||||
if (priv->window->override_redirect &&
|
if (priv->window->has_custom_frame_extents)
|
||||||
!priv->window->has_custom_frame_extents)
|
return FALSE;
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
/*
|
||||||
|
* Generate shadows for all other windows.
|
||||||
|
*/
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ meta_display_open (void)
|
|||||||
guint32 timestamp;
|
guint32 timestamp;
|
||||||
|
|
||||||
/* A list of all atom names, so that we can intern them in one go. */
|
/* A list of all atom names, so that we can intern them in one go. */
|
||||||
char *atom_names[] = {
|
const char *atom_names[] = {
|
||||||
#define item(x) #x,
|
#define item(x) #x,
|
||||||
#include <x11/atomnames.h>
|
#include <x11/atomnames.h>
|
||||||
#undef item
|
#undef item
|
||||||
@@ -605,14 +605,13 @@ meta_display_open (void)
|
|||||||
meta_prefs_add_listener (prefs_changed_callback, display);
|
meta_prefs_add_listener (prefs_changed_callback, display);
|
||||||
|
|
||||||
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
|
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
|
||||||
XInternAtoms (display->xdisplay, atom_names, G_N_ELEMENTS (atom_names),
|
XInternAtoms (display->xdisplay, (char **)atom_names, G_N_ELEMENTS (atom_names),
|
||||||
False, atoms);
|
False, atoms);
|
||||||
{
|
|
||||||
int i = 0;
|
i = 0;
|
||||||
#define item(x) display->atom_##x = atoms[i++];
|
#define item(x) display->atom_##x = atoms[i++];
|
||||||
#include <x11/atomnames.h>
|
#include <x11/atomnames.h>
|
||||||
#undef item
|
#undef item
|
||||||
}
|
|
||||||
|
|
||||||
display->prop_hooks = NULL;
|
display->prop_hooks = NULL;
|
||||||
meta_display_init_window_prop_hooks (display);
|
meta_display_init_window_prop_hooks (display);
|
||||||
@@ -1964,9 +1963,12 @@ meta_display_end_grab_op (MetaDisplay *display,
|
|||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Ending grab op %u at time %u\n", grab_op, timestamp);
|
"Ending grab op %u at time %u\n", grab_op, timestamp);
|
||||||
|
|
||||||
if (display->event_route == META_EVENT_ROUTE_NORMAL)
|
if (display->event_route == META_EVENT_ROUTE_NORMAL ||
|
||||||
|
display->event_route == META_EVENT_ROUTE_COMPOSITOR_GRAB)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_assert (grab_window != NULL);
|
||||||
|
|
||||||
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||||
display->screen, grab_window, grab_op);
|
display->screen, grab_window, grab_op);
|
||||||
|
|
||||||
|
|||||||
@@ -206,8 +206,8 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
|
|
||||||
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
|
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
|
||||||
{
|
{
|
||||||
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
|
meta_cursor_tracker_update_position (meta_cursor_tracker_get_for_screen (NULL),
|
||||||
meta_cursor_tracker_update_position (tracker, event->motion.x, event->motion.y);
|
event->motion.x, event->motion.y);
|
||||||
display->monitor_cache_invalidated = TRUE;
|
display->monitor_cache_invalidated = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ reload_modmap (MetaKeyBindingManager *keys)
|
|||||||
|
|
||||||
/* Modifiers to find. */
|
/* Modifiers to find. */
|
||||||
struct {
|
struct {
|
||||||
char *name;
|
const char *name;
|
||||||
xkb_mod_mask_t *mask_p;
|
xkb_mod_mask_t *mask_p;
|
||||||
} mods[] = {
|
} mods[] = {
|
||||||
{ "ScrollLock", &scroll_lock_mask },
|
{ "ScrollLock", &scroll_lock_mask },
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ print_version (const gchar *option_name,
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *plugin = "default";
|
static const char *plugin = "default";
|
||||||
|
|
||||||
GOptionEntry mutter_options[] = {
|
GOptionEntry mutter_options[] = {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,6 +96,10 @@ static gboolean bell_is_audible = TRUE;
|
|||||||
static gboolean gnome_accessibility = FALSE;
|
static gboolean gnome_accessibility = FALSE;
|
||||||
static gboolean gnome_animations = TRUE;
|
static gboolean gnome_animations = TRUE;
|
||||||
static char *cursor_theme = NULL;
|
static char *cursor_theme = NULL;
|
||||||
|
/* cursor_size will, when running as an X11 compositing window manager, be the
|
||||||
|
* actual cursor size, multiplied with the global window scaling factor. On
|
||||||
|
* Wayland, it will be the actual cursor size retrieved from gsettings.
|
||||||
|
*/
|
||||||
static int cursor_size = 24;
|
static int cursor_size = 24;
|
||||||
static int draggable_border_width = 10;
|
static int draggable_border_width = 10;
|
||||||
static int drag_threshold;
|
static int drag_threshold;
|
||||||
@@ -123,6 +127,9 @@ static gboolean update_binding (MetaKeyPref *binding,
|
|||||||
static gboolean update_key_binding (const char *key,
|
static gboolean update_key_binding (const char *key,
|
||||||
gchar **strokes);
|
gchar **strokes);
|
||||||
|
|
||||||
|
static void wayland_settings_changed (GSettings *settings,
|
||||||
|
gchar *key,
|
||||||
|
gpointer data);
|
||||||
static void settings_changed (GSettings *settings,
|
static void settings_changed (GSettings *settings,
|
||||||
gchar *key,
|
gchar *key,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
@@ -134,9 +141,10 @@ static void shell_shows_app_menu_changed (GtkSettings *settings,
|
|||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static void update_cursor_size (GtkSettings *settings,
|
static void update_cursor_size_from_gtk (GtkSettings *settings,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
static void update_cursor_size (void);
|
||||||
|
|
||||||
static void queue_changed (MetaPreference pref);
|
static void queue_changed (MetaPreference pref);
|
||||||
|
|
||||||
@@ -161,8 +169,8 @@ typedef struct
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char *key;
|
const char *key;
|
||||||
char *schema;
|
const char *schema;
|
||||||
MetaPreference pref;
|
MetaPreference pref;
|
||||||
} MetaBasePreference;
|
} MetaBasePreference;
|
||||||
|
|
||||||
@@ -963,14 +971,18 @@ meta_prefs_init (void)
|
|||||||
G_CALLBACK (settings_changed), NULL);
|
G_CALLBACK (settings_changed), NULL);
|
||||||
g_signal_connect (settings, "changed::" KEY_GNOME_CURSOR_THEME,
|
g_signal_connect (settings, "changed::" KEY_GNOME_CURSOR_THEME,
|
||||||
G_CALLBACK (settings_changed), NULL);
|
G_CALLBACK (settings_changed), NULL);
|
||||||
|
if (meta_is_wayland_compositor ())
|
||||||
|
g_signal_connect (settings, "changed::cursor-size",
|
||||||
|
G_CALLBACK (wayland_settings_changed), NULL);
|
||||||
g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings);
|
g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings);
|
||||||
|
|
||||||
g_signal_connect (gtk_settings_get_default (),
|
g_signal_connect (gtk_settings_get_default (),
|
||||||
"notify::gtk-shell-shows-app-menu",
|
"notify::gtk-shell-shows-app-menu",
|
||||||
G_CALLBACK (shell_shows_app_menu_changed), NULL);
|
G_CALLBACK (shell_shows_app_menu_changed), NULL);
|
||||||
|
|
||||||
g_signal_connect (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
|
if (!meta_is_wayland_compositor ())
|
||||||
G_CALLBACK (update_cursor_size), NULL);
|
g_signal_connect (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
|
||||||
|
G_CALLBACK (update_cursor_size_from_gtk), NULL);
|
||||||
|
|
||||||
settings = g_settings_new (SCHEMA_INPUT_SOURCES);
|
settings = g_settings_new (SCHEMA_INPUT_SOURCES);
|
||||||
g_signal_connect (settings, "changed::" KEY_XKB_OPTIONS,
|
g_signal_connect (settings, "changed::" KEY_XKB_OPTIONS,
|
||||||
@@ -992,7 +1004,7 @@ meta_prefs_init (void)
|
|||||||
handle_preference_init_string_array ();
|
handle_preference_init_string_array ();
|
||||||
handle_preference_init_int ();
|
handle_preference_init_int ();
|
||||||
|
|
||||||
update_cursor_size (gtk_settings_get_default (), NULL, NULL);
|
update_cursor_size ();
|
||||||
shell_shows_app_menu_changed (gtk_settings_get_default (), NULL, NULL);
|
shell_shows_app_menu_changed (gtk_settings_get_default (), NULL, NULL);
|
||||||
|
|
||||||
init_bindings ();
|
init_bindings ();
|
||||||
@@ -1133,6 +1145,20 @@ meta_prefs_override_preference_schema (const char *key, const char *schema)
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
wayland_settings_changed (GSettings *settings,
|
||||||
|
gchar *key,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GVariant *value = g_settings_get_value (settings, key);
|
||||||
|
const GVariantType *type = g_variant_get_type (value);
|
||||||
|
|
||||||
|
g_return_if_fail (g_variant_type_equal (type, G_VARIANT_TYPE_INT32));
|
||||||
|
g_return_if_fail (g_str_equal (key, "cursor-size"));
|
||||||
|
|
||||||
|
update_cursor_size ();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
settings_changed (GSettings *settings,
|
settings_changed (GSettings *settings,
|
||||||
gchar *key,
|
gchar *key,
|
||||||
@@ -1216,9 +1242,29 @@ shell_shows_app_menu_changed (GtkSettings *settings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_cursor_size (GtkSettings *settings,
|
update_cursor_size (void)
|
||||||
GParamSpec *pspec,
|
{
|
||||||
gpointer data)
|
if (meta_is_wayland_compositor ())
|
||||||
|
{
|
||||||
|
/* When running as a Wayland compositor, since we size of the cursor
|
||||||
|
* depends on what output it is on, we cannot use the GTK+
|
||||||
|
* "gtk-cursor-theme-size" setting because it has already been multiplied
|
||||||
|
* by the primary monitor scale. So, instead get the non-premultiplied
|
||||||
|
* cursor size value directly from gsettings instead.
|
||||||
|
*/
|
||||||
|
cursor_size =
|
||||||
|
g_settings_get_int (SETTINGS (SCHEMA_INTERFACE), "cursor-size");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
update_cursor_size_from_gtk (gtk_settings_get_default (), NULL, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_cursor_size_from_gtk (GtkSettings *settings,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkScreen *screen = gdk_screen_get_default ();
|
GdkScreen *screen = gdk_screen_get_default ();
|
||||||
GValue value = G_VALUE_INIT;
|
GValue value = G_VALUE_INIT;
|
||||||
|
|||||||
@@ -2100,7 +2100,7 @@ meta_screen_queue_workarea_recalc (MetaScreen *screen)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
#ifdef WITH_VERBOSE_MODE
|
||||||
static char *
|
static const char *
|
||||||
meta_screen_corner_to_string (MetaScreenCorner corner)
|
meta_screen_corner_to_string (MetaScreenCorner corner)
|
||||||
{
|
{
|
||||||
switch (corner)
|
switch (corner)
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ stack_sync_to_xserver (MetaStack *stack)
|
|||||||
all_root_children_stacked = g_array_new (FALSE, FALSE, sizeof (guint64));
|
all_root_children_stacked = g_array_new (FALSE, FALSE, sizeof (guint64));
|
||||||
x11_hidden_stack_ids = g_array_new (FALSE, FALSE, sizeof (guint64));
|
x11_hidden_stack_ids = g_array_new (FALSE, FALSE, sizeof (guint64));
|
||||||
|
|
||||||
meta_topic (META_DEBUG_STACK, "Top to bottom: ");
|
meta_topic (META_DEBUG_STACK, "Bottom to top: ");
|
||||||
meta_push_no_msg_prefix ();
|
meta_push_no_msg_prefix ();
|
||||||
|
|
||||||
for (tmp = g_list_last(stack->sorted); tmp != NULL; tmp = tmp->prev)
|
for (tmp = g_list_last(stack->sorted); tmp != NULL; tmp = tmp->prev)
|
||||||
@@ -1088,11 +1088,7 @@ stack_sync_to_xserver (MetaStack *stack)
|
|||||||
if (w->hidden)
|
if (w->hidden)
|
||||||
{
|
{
|
||||||
if (w->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
if (w->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
{
|
g_array_append_val (x11_hidden_stack_ids, top_level_window);
|
||||||
guint64 stack_id = top_level_window;
|
|
||||||
|
|
||||||
g_array_append_val (x11_hidden_stack_ids, stack_id);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#define NUM_RANDOM_RUNS 10000
|
#define NUM_RANDOM_RUNS 10000
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_random_ness ()
|
init_random_ness (void)
|
||||||
{
|
{
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ new_monitor_edge (int x, int y, int width, int height, int side_type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_area ()
|
test_area (void)
|
||||||
{
|
{
|
||||||
MetaRectangle temp;
|
MetaRectangle temp;
|
||||||
int i;
|
int i;
|
||||||
@@ -116,7 +116,7 @@ test_area ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_intersect ()
|
test_intersect (void)
|
||||||
{
|
{
|
||||||
MetaRectangle a = {100, 200, 50, 40};
|
MetaRectangle a = {100, 200, 50, 40};
|
||||||
MetaRectangle b = { 0, 50, 110, 152};
|
MetaRectangle b = { 0, 50, 110, 152};
|
||||||
@@ -144,7 +144,7 @@ test_intersect ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_equal ()
|
test_equal (void)
|
||||||
{
|
{
|
||||||
MetaRectangle a = {10, 12, 4, 18};
|
MetaRectangle a = {10, 12, 4, 18};
|
||||||
MetaRectangle b = a;
|
MetaRectangle b = a;
|
||||||
@@ -163,7 +163,7 @@ test_equal ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_overlap_funcs ()
|
test_overlap_funcs (void)
|
||||||
{
|
{
|
||||||
MetaRectangle temp1, temp2;
|
MetaRectangle temp1, temp2;
|
||||||
int i;
|
int i;
|
||||||
@@ -186,7 +186,7 @@ test_overlap_funcs ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_basic_fitting ()
|
test_basic_fitting (void)
|
||||||
{
|
{
|
||||||
MetaRectangle temp1, temp2, temp3;
|
MetaRectangle temp1, temp2, temp3;
|
||||||
int i;
|
int i;
|
||||||
@@ -357,7 +357,7 @@ get_monitor_edges (int which_monitor_set, int which_strut_set)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
test_merge_regions ()
|
test_merge_regions (void)
|
||||||
{
|
{
|
||||||
/* logarithmically distributed random number of struts (range?)
|
/* logarithmically distributed random number of struts (range?)
|
||||||
* logarithmically distributed random size of struts (up to screen size???)
|
* logarithmically distributed random size of struts (up to screen size???)
|
||||||
@@ -579,7 +579,7 @@ verify_lists_are_equal (GList *code, GList *answer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_regions_okay ()
|
test_regions_okay (void)
|
||||||
{
|
{
|
||||||
GList* region;
|
GList* region;
|
||||||
GList* tmp;
|
GList* tmp;
|
||||||
@@ -665,7 +665,7 @@ test_regions_okay ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_region_fitting ()
|
test_region_fitting (void)
|
||||||
{
|
{
|
||||||
GList* region;
|
GList* region;
|
||||||
MetaRectangle rect;
|
MetaRectangle rect;
|
||||||
@@ -709,7 +709,7 @@ test_region_fitting ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_clamping_to_region ()
|
test_clamping_to_region (void)
|
||||||
{
|
{
|
||||||
GList* region;
|
GList* region;
|
||||||
MetaRectangle rect;
|
MetaRectangle rect;
|
||||||
@@ -826,7 +826,7 @@ rect_overlaps_region (const GList *spanning_rects,
|
|||||||
gboolean time_to_print = FALSE;
|
gboolean time_to_print = FALSE;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_clipping_to_region ()
|
test_clipping_to_region (void)
|
||||||
{
|
{
|
||||||
GList* region;
|
GList* region;
|
||||||
MetaRectangle rect, temp;
|
MetaRectangle rect, temp;
|
||||||
@@ -888,7 +888,7 @@ test_clipping_to_region ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_shoving_into_region ()
|
test_shoving_into_region (void)
|
||||||
{
|
{
|
||||||
GList* region;
|
GList* region;
|
||||||
MetaRectangle rect, temp;
|
MetaRectangle rect, temp;
|
||||||
@@ -1005,7 +1005,7 @@ verify_edge_lists_are_equal (GList *code, GList *answer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_find_onscreen_edges ()
|
test_find_onscreen_edges (void)
|
||||||
{
|
{
|
||||||
GList* edges;
|
GList* edges;
|
||||||
GList* tmp;
|
GList* tmp;
|
||||||
@@ -1138,7 +1138,7 @@ test_find_onscreen_edges ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_find_nonintersected_monitor_edges ()
|
test_find_nonintersected_monitor_edges (void)
|
||||||
{
|
{
|
||||||
GList* edges;
|
GList* edges;
|
||||||
GList* tmp;
|
GList* tmp;
|
||||||
@@ -1227,7 +1227,7 @@ test_find_nonintersected_monitor_edges ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_gravity_resize ()
|
test_gravity_resize (void)
|
||||||
{
|
{
|
||||||
MetaRectangle oldrect, rect, temp;
|
MetaRectangle oldrect, rect, temp;
|
||||||
|
|
||||||
@@ -1329,7 +1329,7 @@ test_gravity_resize ()
|
|||||||
|
|
||||||
#define EPSILON 0.000000001
|
#define EPSILON 0.000000001
|
||||||
static void
|
static void
|
||||||
test_find_closest_point_to_line ()
|
test_find_closest_point_to_line (void)
|
||||||
{
|
{
|
||||||
double x1, y1, x2, y2, px, py, rx, ry;
|
double x1, y1, x2, y2, px, py, rx, ry;
|
||||||
double answer_x, answer_y;
|
double answer_x, answer_y;
|
||||||
@@ -1381,7 +1381,7 @@ test_find_closest_point_to_line ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main(void)
|
||||||
{
|
{
|
||||||
init_random_ness ();
|
init_random_ness ();
|
||||||
test_area ();
|
test_area ();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
static void
|
static void
|
||||||
meta_topic_real_valist (MetaDebugTopic topic,
|
meta_topic_real_valist (MetaDebugTopic topic,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list args);
|
va_list args) G_GNUC_PRINTF(2, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gint verbose_topics = 0;
|
static gint verbose_topics = 0;
|
||||||
|
|||||||
@@ -763,10 +763,22 @@ meta_window_update_desc (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
g_clear_pointer (&window->desc, g_free);
|
g_clear_pointer (&window->desc, g_free);
|
||||||
|
|
||||||
if (window->title)
|
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
window->desc = g_strdup_printf ("0x%lx (%.10s)", window->xwindow, window->title);
|
{
|
||||||
|
if (window->title)
|
||||||
|
window->desc = g_strdup_printf ("0x%lx (%.10s)", window->xwindow, window->title);
|
||||||
|
else
|
||||||
|
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
|
{
|
||||||
|
guint64 small_stamp = window->stamp - G_GUINT64_CONSTANT(0x100000000);
|
||||||
|
|
||||||
|
if (window->title)
|
||||||
|
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT " (%.10s)", small_stamp, window->title);
|
||||||
|
else
|
||||||
|
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT , small_stamp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -3183,12 +3195,23 @@ meta_window_make_fullscreen (MetaWindow *window)
|
|||||||
|
|
||||||
if (!window->fullscreen)
|
if (!window->fullscreen)
|
||||||
{
|
{
|
||||||
meta_window_make_fullscreen_internal (window);
|
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||||
|
|
||||||
|
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||||
|
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||||
|
|
||||||
|
meta_window_make_fullscreen_internal (window);
|
||||||
meta_window_move_resize_internal (window,
|
meta_window_move_resize_internal (window,
|
||||||
META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION | META_MOVE_RESIZE_STATE_CHANGED,
|
(META_MOVE_RESIZE_MOVE_ACTION |
|
||||||
|
META_MOVE_RESIZE_RESIZE_ACTION |
|
||||||
|
META_MOVE_RESIZE_STATE_CHANGED |
|
||||||
|
META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR),
|
||||||
NorthWestGravity,
|
NorthWestGravity,
|
||||||
window->unconstrained_rect);
|
window->unconstrained_rect);
|
||||||
|
|
||||||
|
meta_compositor_size_change_window (window->display->compositor,
|
||||||
|
window, META_SIZE_CHANGE_FULLSCREEN,
|
||||||
|
&old_frame_rect, &old_buffer_rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3199,7 +3222,7 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->fullscreen)
|
if (window->fullscreen)
|
||||||
{
|
{
|
||||||
MetaRectangle target_rect;
|
MetaRectangle old_frame_rect, old_buffer_rect, target_rect;
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Unfullscreening %s\n", window->desc);
|
"Unfullscreening %s\n", window->desc);
|
||||||
@@ -3208,6 +3231,8 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
target_rect = window->saved_rect;
|
target_rect = window->saved_rect;
|
||||||
|
|
||||||
meta_window_frame_size_changed (window);
|
meta_window_frame_size_changed (window);
|
||||||
|
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||||
|
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||||
|
|
||||||
/* Window's size hints may have changed while maximized, making
|
/* Window's size hints may have changed while maximized, making
|
||||||
* saved_rect invalid. #329152
|
* saved_rect invalid. #329152
|
||||||
@@ -3222,10 +3247,17 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
set_net_wm_state (window);
|
set_net_wm_state (window);
|
||||||
|
|
||||||
meta_window_move_resize_internal (window,
|
meta_window_move_resize_internal (window,
|
||||||
META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION | META_MOVE_RESIZE_STATE_CHANGED,
|
(META_MOVE_RESIZE_MOVE_ACTION |
|
||||||
|
META_MOVE_RESIZE_RESIZE_ACTION |
|
||||||
|
META_MOVE_RESIZE_STATE_CHANGED |
|
||||||
|
META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR),
|
||||||
NorthWestGravity,
|
NorthWestGravity,
|
||||||
target_rect);
|
target_rect);
|
||||||
|
|
||||||
|
meta_compositor_size_change_window (window->display->compositor,
|
||||||
|
window, META_SIZE_CHANGE_UNFULLSCREEN,
|
||||||
|
&old_frame_rect, &old_buffer_rect);
|
||||||
|
|
||||||
meta_window_update_layer (window);
|
meta_window_update_layer (window);
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]);
|
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_FULLSCREEN]);
|
||||||
@@ -4312,8 +4344,8 @@ set_workspace_state (MetaWindow *window,
|
|||||||
GList *l;
|
GList *l;
|
||||||
for (l = window->screen->workspaces; l != NULL; l = l->next)
|
for (l = window->screen->workspaces; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
MetaWorkspace *workspace = l->data;
|
MetaWorkspace *ws = l->data;
|
||||||
meta_workspace_remove_window (workspace, window);
|
meta_workspace_remove_window (ws, window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4327,8 +4359,8 @@ set_workspace_state (MetaWindow *window,
|
|||||||
GList *l;
|
GList *l;
|
||||||
for (l = window->screen->workspaces; l != NULL; l = l->next)
|
for (l = window->screen->workspaces; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
MetaWorkspace *workspace = l->data;
|
MetaWorkspace *ws = l->data;
|
||||||
meta_workspace_add_window (workspace, window);
|
meta_workspace_add_window (ws, window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6272,7 +6304,7 @@ find_ancestor_func (MetaWindow *window,
|
|||||||
* so by traversing the @transient's ancestors until it either locates @window
|
* so by traversing the @transient's ancestors until it either locates @window
|
||||||
* or reaches an ancestor that is not transient.
|
* or reaches an ancestor that is not transient.
|
||||||
*
|
*
|
||||||
* Return Value: (transfer none): %TRUE if window is an ancestor of transient.
|
* Return Value: %TRUE if window is an ancestor of transient.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_window_is_ancestor_of_transient (MetaWindow *window,
|
meta_window_is_ancestor_of_transient (MetaWindow *window,
|
||||||
@@ -7010,7 +7042,7 @@ meta_window_get_transient_for (MetaWindow *window)
|
|||||||
* Returns pid of the process that created this window, if known (obtained from
|
* Returns pid of the process that created this window, if known (obtained from
|
||||||
* the _NET_WM_PID property).
|
* the _NET_WM_PID property).
|
||||||
*
|
*
|
||||||
* Return value: (transfer none): the pid, or -1 if not known.
|
* Return value: the pid, or -1 if not known.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
meta_window_get_pid (MetaWindow *window)
|
meta_window_get_pid (MetaWindow *window)
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ meta_workspace_get_onmonitor_region (MetaWorkspace *workspace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
#ifdef WITH_VERBOSE_MODE
|
||||||
static char *
|
static const char *
|
||||||
meta_motion_direction_to_string (MetaMotionDirection direction)
|
meta_motion_direction_to_string (MetaMotionDirection direction)
|
||||||
{
|
{
|
||||||
switch (direction)
|
switch (direction)
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ typedef enum
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
META_SIZE_CHANGE_MAXIMIZE,
|
META_SIZE_CHANGE_MAXIMIZE,
|
||||||
META_SIZE_CHANGE_UNMAXIMIZE,
|
META_SIZE_CHANGE_UNMAXIMIZE,
|
||||||
|
META_SIZE_CHANGE_FULLSCREEN,
|
||||||
|
META_SIZE_CHANGE_UNFULLSCREEN
|
||||||
} MetaSizeChange;
|
} MetaSizeChange;
|
||||||
|
|
||||||
MetaCompositor *meta_compositor_new (MetaDisplay *display);
|
MetaCompositor *meta_compositor_new (MetaDisplay *display);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ typedef enum
|
|||||||
} MetaExitCode;
|
} MetaExitCode;
|
||||||
|
|
||||||
/* exit immediately */
|
/* exit immediately */
|
||||||
void meta_exit (MetaExitCode code);
|
void meta_exit (MetaExitCode code) G_GNUC_NORETURN;
|
||||||
|
|
||||||
/* g_main_loop_quit() then fall out of main() */
|
/* g_main_loop_quit() then fall out of main() */
|
||||||
void meta_quit (MetaExitCode code);
|
void meta_quit (MetaExitCode code);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/extensions/sync.h>
|
#include <X11/extensions/sync.h>
|
||||||
|
|
||||||
char *client_id = "0";
|
const char *client_id = "0";
|
||||||
static gboolean wayland;
|
static gboolean wayland;
|
||||||
GHashTable *windows;
|
GHashTable *windows;
|
||||||
|
|
||||||
|
|||||||
@@ -1094,7 +1094,6 @@ main (int argc, char **argv)
|
|||||||
if (all_tests)
|
if (all_tests)
|
||||||
{
|
{
|
||||||
GFile *test_dir = g_file_new_for_path (MUTTER_PKGDATADIR "/tests");
|
GFile *test_dir = g_file_new_for_path (MUTTER_PKGDATADIR "/tests");
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
if (!find_metatests_in_directory (test_dir, tests, &error))
|
if (!find_metatests_in_directory (test_dir, tests, &error))
|
||||||
{
|
{
|
||||||
@@ -1120,7 +1119,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
/* Then initalize mutter with a different set of arguments */
|
/* Then initalize mutter with a different set of arguments */
|
||||||
|
|
||||||
char *fake_args[] = { NULL, "--wayland" };
|
char *fake_args[] = { NULL, (char *)"--wayland" };
|
||||||
fake_args[0] = argv[0];
|
fake_args[0] = argv[0];
|
||||||
char **fake_argv = fake_args;
|
char **fake_argv = fake_args;
|
||||||
int fake_argc = 2;
|
int fake_argc = 2;
|
||||||
|
|||||||
@@ -915,11 +915,9 @@ meta_theme_get_default (void)
|
|||||||
switch (frame_type)
|
switch (frame_type)
|
||||||
{
|
{
|
||||||
case META_FRAME_TYPE_NORMAL:
|
case META_FRAME_TYPE_NORMAL:
|
||||||
break;
|
|
||||||
case META_FRAME_TYPE_DIALOG:
|
case META_FRAME_TYPE_DIALOG:
|
||||||
case META_FRAME_TYPE_MODAL_DIALOG:
|
case META_FRAME_TYPE_MODAL_DIALOG:
|
||||||
case META_FRAME_TYPE_ATTACHED:
|
case META_FRAME_TYPE_ATTACHED:
|
||||||
layout->hide_buttons = TRUE;
|
|
||||||
break;
|
break;
|
||||||
case META_FRAME_TYPE_MENU:
|
case META_FRAME_TYPE_MENU:
|
||||||
case META_FRAME_TYPE_UTILITY:
|
case META_FRAME_TYPE_UTILITY:
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ typedef struct _MetaWaylandDataSourceWayland
|
|||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
} MetaWaylandDataSourceWayland;
|
} MetaWaylandDataSourceWayland;
|
||||||
|
|
||||||
GType meta_wayland_data_source_wayland_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandDataSource, meta_wayland_data_source,
|
G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandDataSource, meta_wayland_data_source,
|
||||||
G_TYPE_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
G_DEFINE_TYPE (MetaWaylandDataSourceWayland, meta_wayland_data_source_wayland,
|
G_DEFINE_TYPE (MetaWaylandDataSourceWayland, meta_wayland_data_source_wayland,
|
||||||
@@ -405,8 +403,8 @@ destroy_data_device_origin (struct wl_listener *listener, void *data)
|
|||||||
wl_container_of (listener, drag_grab, drag_origin_listener);
|
wl_container_of (listener, drag_grab, drag_origin_listener);
|
||||||
|
|
||||||
drag_grab->drag_origin = NULL;
|
drag_grab->drag_origin = NULL;
|
||||||
data_device_end_drag_grab (drag_grab);
|
|
||||||
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
|
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
|
||||||
|
data_device_end_drag_grab (drag_grab);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -415,8 +413,8 @@ drag_grab_data_source_destroyed (gpointer data, GObject *where_the_object_was)
|
|||||||
MetaWaylandDragGrab *drag_grab = data;
|
MetaWaylandDragGrab *drag_grab = data;
|
||||||
|
|
||||||
drag_grab->drag_data_source = NULL;
|
drag_grab->drag_data_source = NULL;
|
||||||
data_device_end_drag_grab (drag_grab);
|
|
||||||
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
|
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
|
||||||
|
data_device_end_drag_grab (drag_grab);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -745,12 +743,14 @@ meta_wayland_data_device_set_dnd_source (MetaWaylandDataDevice *data_device,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (data_device->dnd_data_source)
|
if (data_device->dnd_data_source)
|
||||||
g_object_remove_weak_pointer (G_OBJECT (source),
|
g_object_remove_weak_pointer (G_OBJECT (data_device->dnd_data_source),
|
||||||
(gpointer *)&data_device->dnd_data_source);
|
(gpointer *)&data_device->dnd_data_source);
|
||||||
|
|
||||||
data_device->dnd_data_source = source;
|
data_device->dnd_data_source = source;
|
||||||
g_object_add_weak_pointer (G_OBJECT (source),
|
|
||||||
(gpointer *)&data_device->dnd_data_source);
|
if (source)
|
||||||
|
g_object_add_weak_pointer (G_OBJECT (data_device->dnd_data_source),
|
||||||
|
(gpointer *)&data_device->dnd_data_source);
|
||||||
|
|
||||||
wl_signal_emit (&data_device->dnd_ownership_signal, source);
|
wl_signal_emit (&data_device->dnd_ownership_signal, source);
|
||||||
}
|
}
|
||||||
@@ -912,6 +912,12 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_device)
|
|||||||
MetaWaylandDataSource *source;
|
MetaWaylandDataSource *source;
|
||||||
|
|
||||||
focus_client = meta_wayland_keyboard_get_focus_client (&seat->keyboard);
|
focus_client = meta_wayland_keyboard_get_focus_client (&seat->keyboard);
|
||||||
|
|
||||||
|
if (focus_client == data_device->focus_client)
|
||||||
|
return;
|
||||||
|
|
||||||
|
data_device->focus_client = focus_client;
|
||||||
|
|
||||||
if (!focus_client)
|
if (!focus_client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -55,13 +55,12 @@ struct _MetaWaylandDataDevice
|
|||||||
struct wl_listener selection_data_source_listener;
|
struct wl_listener selection_data_source_listener;
|
||||||
struct wl_list resource_list;
|
struct wl_list resource_list;
|
||||||
MetaWaylandDragGrab *current_grab;
|
MetaWaylandDragGrab *current_grab;
|
||||||
|
struct wl_client *focus_client;
|
||||||
|
|
||||||
struct wl_signal selection_ownership_signal;
|
struct wl_signal selection_ownership_signal;
|
||||||
struct wl_signal dnd_ownership_signal;
|
struct wl_signal dnd_ownership_signal;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_data_source_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
void meta_wayland_data_device_manager_init (MetaWaylandCompositor *compositor);
|
void meta_wayland_data_device_manager_init (MetaWaylandCompositor *compositor);
|
||||||
|
|
||||||
void meta_wayland_data_device_init (MetaWaylandDataDevice *data_device);
|
void meta_wayland_data_device_init (MetaWaylandDataDevice *data_device);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
#include "meta-wayland-private.h"
|
#include "meta-wayland-private.h"
|
||||||
#include "meta-wayland-surface.h"
|
#include "meta-wayland-surface.h"
|
||||||
#include "meta-wayland-buffer.h"
|
#include "meta-wayland-buffer.h"
|
||||||
|
#include "meta-xwayland.h"
|
||||||
#include "meta-cursor.h"
|
#include "meta-cursor.h"
|
||||||
#include "meta-cursor-tracker-private.h"
|
#include "meta-cursor-tracker-private.h"
|
||||||
#include "meta-surface-actor-wayland.h"
|
#include "meta-surface-actor-wayland.h"
|
||||||
@@ -74,7 +75,6 @@ struct _MetaWaylandSurfaceRoleCursor
|
|||||||
MetaCursorSprite *cursor_sprite;
|
MetaCursorSprite *cursor_sprite;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_cursor_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleCursor,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleCursor,
|
||||||
meta_wayland_surface_role_cursor,
|
meta_wayland_surface_role_cursor,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -820,9 +820,12 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
MetaScreen *screen = display->screen;
|
MetaScreen *screen = display->screen;
|
||||||
const MetaMonitorInfo *monitor;
|
const MetaMonitorInfo *monitor;
|
||||||
|
|
||||||
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
if (!meta_xwayland_is_xwayland_surface (surface))
|
||||||
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
{
|
||||||
(float)monitor->scale / surface->scale);
|
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
||||||
|
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
||||||
|
(float)monitor->scale / surface->scale);
|
||||||
|
}
|
||||||
meta_wayland_surface_update_outputs (surface);
|
meta_wayland_surface_update_outputs (surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,11 +73,8 @@ typedef struct
|
|||||||
struct wl_listener sibling_destroy_listener;
|
struct wl_listener sibling_destroy_listener;
|
||||||
} MetaWaylandSubsurfacePlacementOp;
|
} MetaWaylandSubsurfacePlacementOp;
|
||||||
|
|
||||||
GType meta_wayland_surface_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurface, meta_wayland_surface, G_TYPE_OBJECT);
|
G_DEFINE_TYPE (MetaWaylandSurface, meta_wayland_surface, G_TYPE_OBJECT);
|
||||||
|
|
||||||
GType meta_wayland_surface_role_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandSurfaceRole,
|
G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandSurfaceRole,
|
||||||
meta_wayland_surface_role,
|
meta_wayland_surface_role,
|
||||||
G_TYPE_OBJECT);
|
G_TYPE_OBJECT);
|
||||||
@@ -87,7 +84,6 @@ struct _MetaWaylandSurfaceRoleSubsurface
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_subsurface_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleSubsurface,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleSubsurface,
|
||||||
meta_wayland_surface_role_subsurface,
|
meta_wayland_surface_role_subsurface,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -97,7 +93,6 @@ struct _MetaWaylandSurfaceRoleXdgSurface
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_xdg_surface_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXdgSurface,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXdgSurface,
|
||||||
meta_wayland_surface_role_xdg_surface,
|
meta_wayland_surface_role_xdg_surface,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -107,7 +102,6 @@ struct _MetaWaylandSurfaceRoleXdgPopup
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_xdg_popup_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXdgPopup,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXdgPopup,
|
||||||
meta_wayland_surface_role_xdg_popup,
|
meta_wayland_surface_role_xdg_popup,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -117,7 +111,6 @@ struct _MetaWaylandSurfaceRoleWlShellSurface
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_wl_shell_surface_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleWlShellSurface,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleWlShellSurface,
|
||||||
meta_wayland_surface_role_wl_shell_surface,
|
meta_wayland_surface_role_wl_shell_surface,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -127,7 +120,6 @@ struct _MetaWaylandSurfaceRoleDND
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_dnd_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
|
||||||
meta_wayland_surface_role_dnd,
|
meta_wayland_surface_role_dnd,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -359,12 +351,6 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (META_IS_WAYLAND_SURFACE_ROLE_XDG_POPUP (surface->role))
|
|
||||||
{
|
|
||||||
/* Ignore commits if we couldn't grab the pointer */
|
|
||||||
if (!window)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (surface->buffer == NULL)
|
if (surface->buffer == NULL)
|
||||||
@@ -377,10 +363,11 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (window != NULL);
|
/* Update the state of the MetaWindow if we still have one. We might not if
|
||||||
|
* the window was unmanaged (for example popup destroyed, NULL buffer attached to
|
||||||
/* We resize X based surfaces according to X events */
|
* wl_shell_surface wl_surface, xdg_surface object was destroyed, etc).
|
||||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
*/
|
||||||
|
if (window && window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
||||||
{
|
{
|
||||||
MetaRectangle geom = { 0 };
|
MetaRectangle geom = { 0 };
|
||||||
|
|
||||||
@@ -936,7 +923,6 @@ set_surface_is_on_output (MetaWaylandSurface *surface,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
surface_handle_output_destroy (MetaWaylandOutput *wayland_output,
|
surface_handle_output_destroy (MetaWaylandOutput *wayland_output,
|
||||||
GParamSpec *pspec,
|
|
||||||
MetaWaylandSurface *surface)
|
MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
set_surface_is_on_output (surface, wayland_output, FALSE);
|
set_surface_is_on_output (surface, wayland_output, FALSE);
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ wl_compositor_create_region (struct wl_client *client,
|
|||||||
meta_wayland_region_create (compositor, client, resource, id);
|
meta_wayland_region_create (compositor, client, resource, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const static struct wl_compositor_interface meta_wayland_wl_compositor_interface = {
|
static const struct wl_compositor_interface meta_wayland_wl_compositor_interface = {
|
||||||
wl_compositor_create_surface,
|
wl_compositor_create_surface,
|
||||||
wl_compositor_create_region
|
wl_compositor_create_region
|
||||||
};
|
};
|
||||||
@@ -272,6 +272,8 @@ set_gnome_env (const char *name,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void meta_wayland_log_func (const char *, va_list) G_GNUC_PRINTF (1, 0);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_wayland_log_func (const char *fmt,
|
meta_wayland_log_func (const char *fmt,
|
||||||
va_list arg)
|
va_list arg)
|
||||||
|
|||||||
@@ -361,6 +361,8 @@ meta_window_wayland_main_monitor_changed (MetaWindow *window,
|
|||||||
|
|
||||||
/* Window size. */
|
/* Window size. */
|
||||||
scale_rect_size (&window->rect, scale_factor);
|
scale_rect_size (&window->rect, scale_factor);
|
||||||
|
scale_rect_size (&window->unconstrained_rect, scale_factor);
|
||||||
|
scale_rect_size (&window->saved_rect, scale_factor);
|
||||||
|
|
||||||
/* Window geometry offset (XXX: Need a better place, see
|
/* Window geometry offset (XXX: Need a better place, see
|
||||||
* meta_window_wayland_move_resize). */
|
* meta_window_wayland_move_resize). */
|
||||||
|
|||||||
@@ -39,8 +39,6 @@
|
|||||||
#include "meta-xwayland-selection-private.h"
|
#include "meta-xwayland-selection-private.h"
|
||||||
#include "meta-wayland-data-device.h"
|
#include "meta-wayland-data-device.h"
|
||||||
|
|
||||||
GType meta_wayland_data_source_xwayland_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
#define INCR_CHUNK_SIZE (128 * 1024)
|
#define INCR_CHUNK_SIZE (128 * 1024)
|
||||||
#define XDND_VERSION 5
|
#define XDND_VERSION 5
|
||||||
|
|
||||||
@@ -88,6 +86,7 @@ struct _MetaWaylandDataSourceXWayland
|
|||||||
MetaWaylandDataSource parent;
|
MetaWaylandDataSource parent;
|
||||||
|
|
||||||
MetaSelectionBridge *selection;
|
MetaSelectionBridge *selection;
|
||||||
|
guint has_utf8_string_atom : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _MetaXWaylandSelection {
|
struct _MetaXWaylandSelection {
|
||||||
@@ -162,7 +161,6 @@ xdnd_send_enter (MetaXWaylandSelection *selection_data,
|
|||||||
if (source_mime_types->size <= 3)
|
if (source_mime_types->size <= 3)
|
||||||
{
|
{
|
||||||
/* The mimetype atoms fit in this same message */
|
/* The mimetype atoms fit in this same message */
|
||||||
gchar **p;
|
|
||||||
gint i = 2;
|
gint i = 2;
|
||||||
|
|
||||||
wl_array_for_each (p, source_mime_types)
|
wl_array_for_each (p, source_mime_types)
|
||||||
@@ -412,27 +410,33 @@ x11_data_write_cb (GObject *object,
|
|||||||
MetaSelectionBridge *selection = user_data;
|
MetaSelectionBridge *selection = user_data;
|
||||||
X11SelectionData *data = selection->x11_selection;
|
X11SelectionData *data = selection->x11_selection;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
gboolean success = TRUE;
|
||||||
|
|
||||||
g_output_stream_write_finish (G_OUTPUT_STREAM (object), res, &error);
|
g_output_stream_write_finish (G_OUTPUT_STREAM (object), res, &error);
|
||||||
|
|
||||||
if (data->incr)
|
if (error)
|
||||||
|
{
|
||||||
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||||
|
{
|
||||||
|
g_error_free (error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_warning ("Error writing from X11 selection: %s\n", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
success = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (success && data->incr)
|
||||||
{
|
{
|
||||||
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
XDeleteProperty (xdisplay, selection->window,
|
XDeleteProperty (xdisplay, selection->window,
|
||||||
gdk_x11_get_xatom_by_name ("_META_SELECTION"));
|
gdk_x11_get_xatom_by_name ("_META_SELECTION"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (error)
|
|
||||||
{
|
{
|
||||||
if (error->domain != G_IO_ERROR ||
|
x11_selection_data_finish (selection, success);
|
||||||
error->code != G_IO_ERROR_CANCELLED)
|
|
||||||
g_warning ("Error writing from X11 selection: %s\n", error->message);
|
|
||||||
|
|
||||||
g_error_free (error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data->incr)
|
|
||||||
x11_selection_data_finish (selection, TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -707,7 +711,8 @@ meta_x11_source_send (MetaWaylandDataSource *source,
|
|||||||
MetaSelectionBridge *selection = source_xwayland->selection;
|
MetaSelectionBridge *selection = source_xwayland->selection;
|
||||||
Atom type_atom;
|
Atom type_atom;
|
||||||
|
|
||||||
if (strcmp (mime_type, "text/plain;charset=utf-8") == 0)
|
if (source_xwayland->has_utf8_string_atom &&
|
||||||
|
strcmp (mime_type, "text/plain;charset=utf-8") == 0)
|
||||||
type_atom = gdk_x11_get_xatom_by_name ("UTF8_STRING");
|
type_atom = gdk_x11_get_xatom_by_name ("UTF8_STRING");
|
||||||
else
|
else
|
||||||
type_atom = gdk_x11_get_xatom_by_name (mime_type);
|
type_atom = gdk_x11_get_xatom_by_name (mime_type);
|
||||||
@@ -850,6 +855,8 @@ meta_xwayland_data_source_fetch_mimetype_list (MetaWaylandDataSource *source,
|
|||||||
Window window,
|
Window window,
|
||||||
Atom prop)
|
Atom prop)
|
||||||
{
|
{
|
||||||
|
MetaWaylandDataSourceXWayland *source_xwayland =
|
||||||
|
META_WAYLAND_DATA_SOURCE_XWAYLAND (source);
|
||||||
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
gulong nitems_ret, bytes_after_ret, i;
|
gulong nitems_ret, bytes_after_ret, i;
|
||||||
Atom *atoms, type_ret, utf8_string;
|
Atom *atoms, type_ret, utf8_string;
|
||||||
@@ -883,10 +890,13 @@ meta_xwayland_data_source_fetch_mimetype_list (MetaWaylandDataSource *source,
|
|||||||
const gchar *mime_type;
|
const gchar *mime_type;
|
||||||
|
|
||||||
if (atoms[i] == utf8_string)
|
if (atoms[i] == utf8_string)
|
||||||
mime_type = "text/plain;charset=utf-8";
|
{
|
||||||
else
|
meta_wayland_data_source_add_mime_type (source,
|
||||||
mime_type = gdk_x11_get_xatom_name (atoms[i]);
|
"text/plain;charset=utf-8");
|
||||||
|
source_xwayland->has_utf8_string_atom = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mime_type = gdk_x11_get_xatom_name (atoms[i]);
|
||||||
meta_wayland_data_source_add_mime_type (source, mime_type);
|
meta_wayland_data_source_add_mime_type (source, mime_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1280,6 +1290,9 @@ meta_xwayland_selection_handle_client_message (MetaWaylandCompositor *compositor
|
|||||||
MetaWaylandDragGrab *drag_grab = compositor->seat->data_device.current_grab;
|
MetaWaylandDragGrab *drag_grab = compositor->seat->data_device.current_grab;
|
||||||
MetaWaylandSurface *drag_focus = meta_wayland_drag_grab_get_focus (drag_grab);
|
MetaWaylandSurface *drag_focus = meta_wayland_drag_grab_get_focus (drag_grab);
|
||||||
|
|
||||||
|
if (!drag_focus)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (event->message_type == xdnd_atoms[ATOM_DND_ENTER])
|
if (event->message_type == xdnd_atoms[ATOM_DND_ENTER])
|
||||||
{
|
{
|
||||||
/* Bit 1 in data.l[1] determines whether there's 3 or less mimetype
|
/* Bit 1 in data.l[1] determines whether there's 3 or less mimetype
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ struct _MetaWaylandSurfaceRoleXWayland
|
|||||||
MetaWaylandSurfaceRole parent;
|
MetaWaylandSurfaceRole parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType meta_wayland_surface_role_xwayland_get_type (void) G_GNUC_CONST;
|
|
||||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXWayland,
|
G_DEFINE_TYPE (MetaWaylandSurfaceRoleXWayland,
|
||||||
meta_wayland_surface_role_xwayland,
|
meta_wayland_surface_role_xwayland,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||||
@@ -56,13 +55,6 @@ associate_window_with_surface (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
MetaDisplay *display = window->display;
|
MetaDisplay *display = window->display;
|
||||||
|
|
||||||
/* If the window has an existing surface, like if we're
|
|
||||||
* undecorating or decorating the window, then we need
|
|
||||||
* to detach the window from its old surface.
|
|
||||||
*/
|
|
||||||
if (window->surface)
|
|
||||||
window->surface->window = NULL;
|
|
||||||
|
|
||||||
if (!meta_wayland_surface_assign_role (surface,
|
if (!meta_wayland_surface_assign_role (surface,
|
||||||
META_TYPE_WAYLAND_SURFACE_ROLE_XWAYLAND))
|
META_TYPE_WAYLAND_SURFACE_ROLE_XWAYLAND))
|
||||||
{
|
{
|
||||||
@@ -89,6 +81,16 @@ associate_window_with_surface_id (MetaXWaylandManager *manager,
|
|||||||
{
|
{
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
|
/* If the window has an existing surface, like if we're
|
||||||
|
* undecorating or decorating the window, then we need
|
||||||
|
* to detach the window from its old surface.
|
||||||
|
*/
|
||||||
|
if (window->surface)
|
||||||
|
{
|
||||||
|
meta_wayland_surface_set_window (window->surface, NULL);
|
||||||
|
window->surface = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
resource = wl_client_get_object (manager->client, surface_id);
|
resource = wl_client_get_object (manager->client, surface_id);
|
||||||
if (resource)
|
if (resource)
|
||||||
{
|
{
|
||||||
@@ -172,6 +174,15 @@ meta_xwayland_handle_wl_surface_id (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface)
|
||||||
|
{
|
||||||
|
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
|
||||||
|
MetaXWaylandManager *manager = &compositor->xwayland_manager;
|
||||||
|
|
||||||
|
return wl_resource_get_client (surface->resource) == manager->client;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
try_display (int display,
|
try_display (int display,
|
||||||
char **filename_out,
|
char **filename_out,
|
||||||
|
|||||||
@@ -28,8 +28,13 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <meta/types.h>
|
#include <meta/types.h>
|
||||||
|
|
||||||
|
#include "wayland/meta-wayland-types.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_xwayland_handle_wl_surface_id (MetaWindow *window,
|
meta_xwayland_handle_wl_surface_id (MetaWindow *window,
|
||||||
guint32 surface_id);
|
guint32 surface_id);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface);
|
||||||
|
|
||||||
#endif /* META_XWAYLAND_H */
|
#endif /* META_XWAYLAND_H */
|
||||||
|
|||||||
@@ -312,8 +312,8 @@ meta_session_init (const char *previous_client_id,
|
|||||||
|
|
||||||
prgname = g_get_prgname ();
|
prgname = g_get_prgname ();
|
||||||
|
|
||||||
prop1.name = SmProgram;
|
prop1.name = (char *)SmProgram;
|
||||||
prop1.type = SmARRAY8;
|
prop1.type = (char *)SmARRAY8;
|
||||||
prop1.num_vals = 1;
|
prop1.num_vals = 1;
|
||||||
prop1.vals = &prop1val;
|
prop1.vals = &prop1val;
|
||||||
prop1val.value = (char *)prgname;
|
prop1val.value = (char *)prgname;
|
||||||
@@ -322,38 +322,38 @@ meta_session_init (const char *previous_client_id,
|
|||||||
/* twm sets getuid() for this, but the SM spec plainly
|
/* twm sets getuid() for this, but the SM spec plainly
|
||||||
* says pw_name, twm is on crack
|
* says pw_name, twm is on crack
|
||||||
*/
|
*/
|
||||||
prop2.name = SmUserID;
|
prop2.name = (char *)SmUserID;
|
||||||
prop2.type = SmARRAY8;
|
prop2.type = (char *)SmARRAY8;
|
||||||
prop2.num_vals = 1;
|
prop2.num_vals = 1;
|
||||||
prop2.vals = &prop2val;
|
prop2.vals = &prop2val;
|
||||||
prop2val.value = (char*) g_get_user_name ();
|
prop2val.value = (char*) g_get_user_name ();
|
||||||
prop2val.length = strlen (prop2val.value);
|
prop2val.length = strlen (prop2val.value);
|
||||||
|
|
||||||
prop3.name = SmRestartStyleHint;
|
prop3.name = (char *)SmRestartStyleHint;
|
||||||
prop3.type = SmCARD8;
|
prop3.type = (char *)SmCARD8;
|
||||||
prop3.num_vals = 1;
|
prop3.num_vals = 1;
|
||||||
prop3.vals = &prop3val;
|
prop3.vals = &prop3val;
|
||||||
prop3val.value = &hint;
|
prop3val.value = &hint;
|
||||||
prop3val.length = 1;
|
prop3val.length = 1;
|
||||||
|
|
||||||
sprintf (pid, "%d", getpid ());
|
sprintf (pid, "%d", getpid ());
|
||||||
prop4.name = SmProcessID;
|
prop4.name = (char *)SmProcessID;
|
||||||
prop4.type = SmARRAY8;
|
prop4.type = (char *)SmARRAY8;
|
||||||
prop4.num_vals = 1;
|
prop4.num_vals = 1;
|
||||||
prop4.vals = &prop4val;
|
prop4.vals = &prop4val;
|
||||||
prop4val.value = pid;
|
prop4val.value = pid;
|
||||||
prop4val.length = strlen (prop4val.value);
|
prop4val.length = strlen (prop4val.value);
|
||||||
|
|
||||||
/* Always start in home directory */
|
/* Always start in home directory */
|
||||||
prop5.name = SmCurrentDirectory;
|
prop5.name = (char *)SmCurrentDirectory;
|
||||||
prop5.type = SmARRAY8;
|
prop5.type = (char *)SmARRAY8;
|
||||||
prop5.num_vals = 1;
|
prop5.num_vals = 1;
|
||||||
prop5.vals = &prop5val;
|
prop5.vals = &prop5val;
|
||||||
prop5val.value = (char*) g_get_home_dir ();
|
prop5val.value = (char*) g_get_home_dir ();
|
||||||
prop5val.length = strlen (prop5val.value);
|
prop5val.length = strlen (prop5val.value);
|
||||||
|
|
||||||
prop6.name = "_GSM_Priority";
|
prop6.name = (char *)"_GSM_Priority";
|
||||||
prop6.type = SmCARD8;
|
prop6.type = (char *)SmCARD8;
|
||||||
prop6.num_vals = 1;
|
prop6.num_vals = 1;
|
||||||
prop6.vals = &prop6val;
|
prop6.vals = &prop6val;
|
||||||
prop6val.value = &priority;
|
prop6val.value = &priority;
|
||||||
@@ -588,15 +588,15 @@ set_clone_restart_commands (void)
|
|||||||
|
|
||||||
/* Restart (use same client ID) */
|
/* Restart (use same client ID) */
|
||||||
|
|
||||||
prop1.name = SmRestartCommand;
|
prop1.name = (char *)SmRestartCommand;
|
||||||
prop1.type = SmLISTofARRAY8;
|
prop1.type = (char *)SmLISTofARRAY8;
|
||||||
|
|
||||||
g_return_if_fail (client_id);
|
g_return_if_fail (client_id);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
restartv[i] = (char *)prgname;
|
restartv[i] = (char *)prgname;
|
||||||
++i;
|
++i;
|
||||||
restartv[i] = "--sm-client-id";
|
restartv[i] = (char *)"--sm-client-id";
|
||||||
++i;
|
++i;
|
||||||
restartv[i] = client_id;
|
restartv[i] = client_id;
|
||||||
++i;
|
++i;
|
||||||
@@ -619,8 +619,8 @@ set_clone_restart_commands (void)
|
|||||||
++i;
|
++i;
|
||||||
clonev[i] = NULL;
|
clonev[i] = NULL;
|
||||||
|
|
||||||
prop2.name = SmCloneCommand;
|
prop2.name = (char *)SmCloneCommand;
|
||||||
prop2.type = SmLISTofARRAY8;
|
prop2.type = (char *)SmLISTofARRAY8;
|
||||||
|
|
||||||
prop2.vals = g_new (SmPropValue, i);
|
prop2.vals = g_new (SmPropValue, i);
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -635,16 +635,16 @@ set_clone_restart_commands (void)
|
|||||||
/* Discard */
|
/* Discard */
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
discardv[i] = "rm";
|
discardv[i] = (char *)"rm";
|
||||||
++i;
|
++i;
|
||||||
discardv[i] = "-f";
|
discardv[i] = (char *)"-f";
|
||||||
++i;
|
++i;
|
||||||
discardv[i] = (char*) full_save_file ();
|
discardv[i] = (char*) full_save_file ();
|
||||||
++i;
|
++i;
|
||||||
discardv[i] = NULL;
|
discardv[i] = NULL;
|
||||||
|
|
||||||
prop3.name = SmDiscardCommand;
|
prop3.name = (char *)SmDiscardCommand;
|
||||||
prop3.type = SmLISTofARRAY8;
|
prop3.type = (char *)SmLISTofARRAY8;
|
||||||
|
|
||||||
prop3.vals = g_new (SmPropValue, i);
|
prop3.vals = g_new (SmPropValue, i);
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -1792,8 +1792,8 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
columns = g_slist_prepend (columns, "Window");
|
columns = g_slist_prepend (columns, (gpointer)"Window");
|
||||||
columns = g_slist_prepend (columns, "Class");
|
columns = g_slist_prepend (columns, (gpointer)"Class");
|
||||||
|
|
||||||
lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
|
lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
|
||||||
|
|
||||||
@@ -1803,7 +1803,7 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
|||||||
MetaWindow *w = tmp->data;
|
MetaWindow *w = tmp->data;
|
||||||
|
|
||||||
lame_details = g_slist_prepend (lame_details,
|
lame_details = g_slist_prepend (lame_details,
|
||||||
w->res_class ? w->res_class : "");
|
w->res_class ? w->res_class : (gpointer)"");
|
||||||
lame_details = g_slist_prepend (lame_details,
|
lame_details = g_slist_prepend (lame_details,
|
||||||
w->title);
|
w->title);
|
||||||
|
|
||||||
|
|||||||
@@ -2000,12 +2000,16 @@ meta_window_move_resize_request (MetaWindow *window,
|
|||||||
if (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION))
|
if (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION))
|
||||||
{
|
{
|
||||||
MetaRectangle rect, monitor_rect;
|
MetaRectangle rect, monitor_rect;
|
||||||
|
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||||
|
gboolean legacy_fullscreen;
|
||||||
|
|
||||||
rect.x = x;
|
rect.x = x;
|
||||||
rect.y = y;
|
rect.y = y;
|
||||||
rect.width = width;
|
rect.width = width;
|
||||||
rect.height = height;
|
rect.height = height;
|
||||||
|
|
||||||
|
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||||
|
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||||
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
||||||
|
|
||||||
/* Workaround braindead legacy apps that don't know how to
|
/* Workaround braindead legacy apps that don't know how to
|
||||||
@@ -2015,12 +2019,14 @@ meta_window_move_resize_request (MetaWindow *window,
|
|||||||
* if there are no struts making the workarea smaller than
|
* if there are no struts making the workarea smaller than
|
||||||
* the monitor.
|
* the monitor.
|
||||||
*/
|
*/
|
||||||
if (meta_prefs_get_force_fullscreen() &&
|
legacy_fullscreen = (meta_prefs_get_force_fullscreen() &&
|
||||||
!window->hide_titlebar_when_maximized &&
|
!window->hide_titlebar_when_maximized &&
|
||||||
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
||||||
meta_rectangle_equal (&rect, &monitor_rect) &&
|
meta_rectangle_equal (&rect, &monitor_rect) &&
|
||||||
window->has_fullscreen_func &&
|
window->has_fullscreen_func &&
|
||||||
!window->fullscreen)
|
!window->fullscreen);
|
||||||
|
|
||||||
|
if (legacy_fullscreen)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
meta_topic (META_DEBUG_GEOMETRY,
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
@@ -2030,11 +2036,17 @@ meta_window_move_resize_request (MetaWindow *window,
|
|||||||
"fullscreen request\n",
|
"fullscreen request\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
meta_window_make_fullscreen_internal (window);
|
meta_window_make_fullscreen_internal (window);
|
||||||
|
flags |= META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
adjust_for_gravity (window, TRUE, gravity, &rect);
|
adjust_for_gravity (window, TRUE, gravity, &rect);
|
||||||
meta_window_client_rect_to_frame_rect (window, &rect, &rect);
|
meta_window_client_rect_to_frame_rect (window, &rect, &rect);
|
||||||
meta_window_move_resize_internal (window, flags, gravity, rect);
|
meta_window_move_resize_internal (window, flags, gravity, rect);
|
||||||
|
|
||||||
|
if (legacy_fullscreen)
|
||||||
|
meta_compositor_size_change_window (window->display->compositor,
|
||||||
|
window, META_SIZE_CHANGE_FULLSCREEN,
|
||||||
|
&old_frame_rect, &old_buffer_rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ window_from_results (GetPropertyResults *results,
|
|||||||
if (!validate_or_free_results (results, 32, XA_WINDOW, TRUE))
|
if (!validate_or_free_results (results, 32, XA_WINDOW, TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
*window_p = *(Window*) results->prop;
|
*window_p = *(uint32_t *) results->prop;
|
||||||
g_free (results->prop);
|
g_free (results->prop);
|
||||||
results->prop = NULL;
|
results->prop = NULL;
|
||||||
|
|
||||||
@@ -523,7 +523,7 @@ counter_from_results (GetPropertyResults *results,
|
|||||||
TRUE))
|
TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
*counter_p = *(XSyncCounter*) results->prop;
|
*counter_p = *(uint32_t *) results->prop;
|
||||||
g_free (results->prop);
|
g_free (results->prop);
|
||||||
results->prop = NULL;
|
results->prop = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user