mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
backends: Make clutter stage resizing more explicit
The stage resizing was placed in the generic backend, which was only run on certain configurations (when running nested or using the native backend). This commits makes the resizing more explicit thus more obvious. https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
parent
085df1170e
commit
55726e787b
@ -346,15 +346,6 @@ meta_backend_real_ungrab_device (MetaBackend *backend,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_real_update_screen_size (MetaBackend *backend,
|
||||
int width, int height)
|
||||
{
|
||||
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
|
||||
clutter_actor_set_size (priv->stage, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_real_select_stage_events (MetaBackend *backend)
|
||||
{
|
||||
@ -393,7 +384,6 @@ meta_backend_class_init (MetaBackendClass *klass)
|
||||
klass->create_cursor_renderer = meta_backend_real_create_cursor_renderer;
|
||||
klass->grab_device = meta_backend_real_grab_device;
|
||||
klass->ungrab_device = meta_backend_real_ungrab_device;
|
||||
klass->update_screen_size = meta_backend_real_update_screen_size;
|
||||
klass->select_stage_events = meta_backend_real_select_stage_events;
|
||||
klass->get_relative_motion_deltas = meta_backend_real_get_relative_motion_deltas;
|
||||
|
||||
|
@ -379,6 +379,15 @@ meta_backend_native_get_relative_motion_deltas (MetaBackend *backend,
|
||||
dx_unaccel, dy_unaccel);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_native_update_screen_size (MetaBackend *backend,
|
||||
int width, int height)
|
||||
{
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
|
||||
clutter_actor_set_size (stage, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_native_class_init (MetaBackendNativeClass *klass)
|
||||
{
|
||||
@ -401,6 +410,7 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
|
||||
backend_class->get_keymap = meta_backend_native_get_keymap;
|
||||
backend_class->lock_layout_group = meta_backend_native_lock_layout_group;
|
||||
backend_class->get_relative_motion_deltas = meta_backend_native_get_relative_motion_deltas;
|
||||
backend_class->update_screen_size = meta_backend_native_update_screen_size;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -813,10 +813,9 @@ meta_backend_x11_update_screen_size (MetaBackend *backend,
|
||||
|
||||
if (priv->mode == META_BACKEND_X11_MODE_NESTED)
|
||||
{
|
||||
/* For a nested wayland session, we want to go through Clutter to update the
|
||||
* toplevel window size, rather than doing it directly.
|
||||
*/
|
||||
META_BACKEND_CLASS (meta_backend_x11_parent_class)->update_screen_size (backend, width, height);
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
|
||||
clutter_actor_set_size (stage, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user