Stop using MetaScreen where it is unnecessary
https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:
parent
b7c3dada81
commit
1d5e37050d
@ -27,7 +27,6 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <meta/screen.h>
|
||||
#include "meta-cursor.h"
|
||||
|
||||
#define META_TYPE_CURSOR_RENDERER (meta_cursor_renderer_get_type ())
|
||||
|
@ -162,15 +162,15 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_cursor_tracker_get_for_screen:
|
||||
* @screen: the #MetaScreen
|
||||
* meta_cursor_tracker_get_for_display:
|
||||
* @display: the #MetaDisplay
|
||||
*
|
||||
* Retrieves the cursor tracker object for @screen.
|
||||
* Retrieves the cursor tracker object for @display.
|
||||
*
|
||||
* Returns: (transfer none):
|
||||
*/
|
||||
MetaCursorTracker *
|
||||
meta_cursor_tracker_get_for_screen (MetaScreen *screen)
|
||||
meta_cursor_tracker_get_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaCursorTracker *tracker = meta_backend_get_cursor_tracker (backend);
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <libupower-glib/upower.h>
|
||||
|
||||
#include "display-private.h"
|
||||
#include <meta/screen.h>
|
||||
#include "stack-tracker.h"
|
||||
#include <meta/meta-monitor-manager.h>
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define META_CURSOR_RENDERER_NATIVE_H
|
||||
|
||||
#include "meta-cursor-renderer.h"
|
||||
#include "meta/meta-backend.h"
|
||||
|
||||
#define META_TYPE_CURSOR_RENDERER_NATIVE (meta_cursor_renderer_native_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaCursorRendererNative, meta_cursor_renderer_native,
|
||||
|
@ -42,8 +42,8 @@
|
||||
* There's two containers in the stage that are used to place window actors, here
|
||||
* are listed in the order in which they are painted:
|
||||
*
|
||||
* - window group, accessible with meta_get_window_group_for_screen()
|
||||
* - top window group, accessible with meta_get_top_window_group_for_screen()
|
||||
* - window group, accessible with meta_get_window_group_for_display()
|
||||
* - top window group, accessible with meta_get_top_window_group_for_display()
|
||||
*
|
||||
* Mutter will place actors representing windows in the window group, except for
|
||||
* override-redirect windows (ie. popups and menus) which will be placed in the
|
||||
@ -55,7 +55,6 @@
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
#include "core.h"
|
||||
#include <meta/screen.h>
|
||||
#include <meta/errors.h>
|
||||
#include <meta/window.h>
|
||||
#include "compositor-private.h"
|
||||
@ -151,78 +150,78 @@ process_damage (MetaCompositor *compositor,
|
||||
|
||||
/* compat helper */
|
||||
static MetaCompositor *
|
||||
get_compositor_for_screen (MetaScreen *screen)
|
||||
get_compositor_for_display (MetaDisplay *display)
|
||||
{
|
||||
return screen->display->compositor;
|
||||
return display->compositor;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_get_stage_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_get_stage_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: (transfer none): The #ClutterStage for the screen
|
||||
* Returns: (transfer none): The #ClutterStage for the display
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_get_stage_for_screen (MetaScreen *screen)
|
||||
meta_get_stage_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->stage;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_get_window_group_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_get_window_group_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: (transfer none): The window group corresponding to @screen
|
||||
* Returns: (transfer none): The window group corresponding to @display
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_get_window_group_for_screen (MetaScreen *screen)
|
||||
meta_get_window_group_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->window_group;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_get_top_window_group_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_get_top_window_group_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: (transfer none): The top window group corresponding to @screen
|
||||
* Returns: (transfer none): The top window group corresponding to @display
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_get_top_window_group_for_screen (MetaScreen *screen)
|
||||
meta_get_top_window_group_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->top_window_group;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_get_feedback_group_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_get_feedback_group_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: (transfer none): The feedback group corresponding to @screen
|
||||
* Returns: (transfer none): The feedback group corresponding to @display
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_get_feedback_group_for_screen (MetaScreen *screen)
|
||||
meta_get_feedback_group_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->feedback_group;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_get_window_actors:
|
||||
* @screen: a #MetaScreen
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @screen
|
||||
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @display
|
||||
*/
|
||||
GList *
|
||||
meta_get_window_actors (MetaScreen *screen)
|
||||
meta_get_window_actors (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->windows;
|
||||
}
|
||||
|
||||
void
|
||||
meta_set_stage_input_region (MetaScreen *screen,
|
||||
meta_set_stage_input_region (MetaDisplay *display,
|
||||
XserverRegion region)
|
||||
{
|
||||
/* As a wayland compositor we can simply ignore all this trickery
|
||||
@ -232,7 +231,6 @@ meta_set_stage_input_region (MetaScreen *screen,
|
||||
*/
|
||||
if (!meta_is_wayland_compositor ())
|
||||
{
|
||||
MetaDisplay *display = screen->display;
|
||||
MetaCompositor *compositor = display->compositor;
|
||||
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
|
||||
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (compositor->stage));
|
||||
@ -249,7 +247,7 @@ meta_set_stage_input_region (MetaScreen *screen,
|
||||
}
|
||||
|
||||
void
|
||||
meta_empty_stage_input_region (MetaScreen *screen)
|
||||
meta_empty_stage_input_region (MetaDisplay *display)
|
||||
{
|
||||
/* Using a static region here is a bit hacky, but Metacity never opens more than
|
||||
* one XDisplay, so it works fine. */
|
||||
@ -257,22 +255,21 @@ meta_empty_stage_input_region (MetaScreen *screen)
|
||||
|
||||
if (region == None)
|
||||
{
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
|
||||
region = XFixesCreateRegion (xdpy, NULL, 0);
|
||||
}
|
||||
|
||||
meta_set_stage_input_region (screen, region);
|
||||
meta_set_stage_input_region (display, region);
|
||||
}
|
||||
|
||||
void
|
||||
meta_focus_stage_window (MetaScreen *screen,
|
||||
meta_focus_stage_window (MetaDisplay *display,
|
||||
guint32 timestamp)
|
||||
{
|
||||
ClutterStage *stage;
|
||||
Window window;
|
||||
|
||||
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
|
||||
stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
|
||||
if (!stage)
|
||||
return;
|
||||
|
||||
@ -281,13 +278,13 @@ meta_focus_stage_window (MetaScreen *screen,
|
||||
if (window == None)
|
||||
return;
|
||||
|
||||
meta_x11_display_set_input_focus_xwindow (screen->display->x11_display,
|
||||
meta_x11_display_set_input_focus_xwindow (display->x11_display,
|
||||
window,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_stage_is_focused (MetaScreen *screen)
|
||||
meta_stage_is_focused (MetaDisplay *display)
|
||||
{
|
||||
ClutterStage *stage;
|
||||
Window window;
|
||||
@ -295,7 +292,7 @@ meta_stage_is_focused (MetaScreen *screen)
|
||||
if (meta_is_wayland_compositor ())
|
||||
return TRUE;
|
||||
|
||||
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
|
||||
stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
|
||||
if (!stage)
|
||||
return FALSE;
|
||||
|
||||
@ -304,7 +301,7 @@ meta_stage_is_focused (MetaScreen *screen)
|
||||
if (window == None)
|
||||
return FALSE;
|
||||
|
||||
return (screen->display->x11_display->focus_xwindow == window);
|
||||
return (display->x11_display->focus_xwindow == window);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -381,7 +378,7 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
|
||||
display->grab_have_keyboard = TRUE;
|
||||
|
||||
g_signal_emit_by_name (display, "grab-op-begin",
|
||||
meta_plugin_get_screen (plugin),
|
||||
meta_plugin_get_display (plugin),
|
||||
display->grab_window, display->grab_op);
|
||||
|
||||
if (meta_is_wayland_compositor ())
|
||||
@ -408,7 +405,7 @@ meta_end_modal_for_plugin (MetaCompositor *compositor,
|
||||
g_return_if_fail (is_modal (display));
|
||||
|
||||
g_signal_emit_by_name (display, "grab-op-end",
|
||||
meta_plugin_get_screen (plugin),
|
||||
meta_plugin_get_display (plugin),
|
||||
display->grab_window, display->grab_op);
|
||||
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
@ -446,9 +443,8 @@ after_stage_paint (ClutterStage *stage,
|
||||
}
|
||||
|
||||
static void
|
||||
redirect_windows (MetaScreen *screen)
|
||||
redirect_windows (MetaDisplay *display)
|
||||
{
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaX11Display *x11_display = meta_display_get_x11_display (display);
|
||||
Display *xdisplay = meta_x11_display_get_xdisplay (x11_display);
|
||||
Window xroot = meta_x11_display_get_xroot (x11_display);
|
||||
@ -494,7 +490,6 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
{
|
||||
MetaDisplay *display = compositor->display;
|
||||
Display *xdisplay = display->x11_display->xdisplay;
|
||||
MetaScreen *screen = display->screen;
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
|
||||
meta_x11_display_set_cm_selection (display->x11_display);
|
||||
@ -518,9 +513,9 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
|
||||
clutter_stage_set_sync_delay (CLUTTER_STAGE (compositor->stage), META_SYNC_DELAY);
|
||||
|
||||
compositor->window_group = meta_window_group_new (screen);
|
||||
compositor->top_window_group = meta_window_group_new (screen);
|
||||
compositor->feedback_group = meta_window_group_new (screen);
|
||||
compositor->window_group = meta_window_group_new (display);
|
||||
compositor->top_window_group = meta_window_group_new (display);
|
||||
compositor->feedback_group = meta_window_group_new (display);
|
||||
|
||||
clutter_actor_add_child (compositor->stage, compositor->window_group);
|
||||
clutter_actor_add_child (compositor->stage, compositor->top_window_group);
|
||||
@ -543,7 +538,7 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
|
||||
XReparentWindow (xdisplay, xwin, compositor->output, 0, 0);
|
||||
|
||||
meta_empty_stage_input_region (screen);
|
||||
meta_empty_stage_input_region (display);
|
||||
|
||||
/* Make sure there isn't any left-over output shape on the
|
||||
* overlay window by setting the whole screen to be an
|
||||
@ -563,7 +558,7 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay);
|
||||
}
|
||||
|
||||
redirect_windows (display->screen);
|
||||
redirect_windows (display);
|
||||
|
||||
compositor->plugin_mgr = meta_plugin_manager_new (compositor);
|
||||
}
|
||||
@ -1265,44 +1260,44 @@ meta_compositor_new (MetaDisplay *display)
|
||||
|
||||
/**
|
||||
* meta_get_overlay_window: (skip)
|
||||
* @screen: a #MetaScreen
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
*/
|
||||
Window
|
||||
meta_get_overlay_window (MetaScreen *screen)
|
||||
meta_get_overlay_window (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
return compositor->output;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_disable_unredirect_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_disable_unredirect_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Disables unredirection, can be usefull in situations where having
|
||||
* unredirected windows is undesireable like when recording a video.
|
||||
*
|
||||
*/
|
||||
void
|
||||
meta_disable_unredirect_for_screen (MetaScreen *screen)
|
||||
meta_disable_unredirect_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
compositor->disable_unredirect_count++;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_enable_unredirect_for_screen:
|
||||
* @screen: a #MetaScreen
|
||||
* meta_enable_unredirect_for_display:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Enables unredirection which reduces the overhead for apps like games.
|
||||
*
|
||||
*/
|
||||
void
|
||||
meta_enable_unredirect_for_screen (MetaScreen *screen)
|
||||
meta_enable_unredirect_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_screen (screen);
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
if (compositor->disable_unredirect_count == 0)
|
||||
g_warning ("Called enable_unredirect_for_screen while unredirection is enabled.");
|
||||
g_warning ("Called enable_unredirect_for_display while unredirection is enabled.");
|
||||
if (compositor->disable_unredirect_count > 0)
|
||||
compositor->disable_unredirect_count--;
|
||||
}
|
||||
@ -1319,15 +1314,15 @@ flash_out_completed (ClutterTimeline *timeline,
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_flash_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
meta_compositor_flash_display (MetaCompositor *compositor,
|
||||
MetaDisplay *display)
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterActor *flash;
|
||||
ClutterTransition *transition;
|
||||
gfloat width, height;
|
||||
|
||||
stage = meta_get_stage_for_screen (screen);
|
||||
stage = meta_get_stage_for_display (display);
|
||||
clutter_actor_get_size (stage, &width, &height);
|
||||
|
||||
flash = clutter_actor_new ();
|
||||
|
@ -3,7 +3,6 @@
|
||||
#ifndef META_BACKGROUND_ACTOR_PRIVATE_H
|
||||
#define META_BACKGROUND_ACTOR_PRIVATE_H
|
||||
|
||||
#include <meta/screen.h>
|
||||
#include <meta/meta-background-actor.h>
|
||||
|
||||
cairo_region_t *meta_background_actor_get_clip_region (MetaBackgroundActor *self);
|
||||
|
@ -86,7 +86,7 @@
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_META_SCREEN = 1,
|
||||
PROP_META_DISPLAY = 1,
|
||||
PROP_MONITOR,
|
||||
PROP_BACKGROUND,
|
||||
PROP_GRADIENT,
|
||||
@ -151,7 +151,7 @@ typedef enum {
|
||||
|
||||
struct _MetaBackgroundActorPrivate
|
||||
{
|
||||
MetaScreen *screen;
|
||||
MetaDisplay *display;
|
||||
int monitor;
|
||||
|
||||
MetaBackground *background;
|
||||
@ -214,7 +214,7 @@ get_preferred_size (MetaBackgroundActor *self,
|
||||
MetaBackgroundActorPrivate *priv = META_BACKGROUND_ACTOR (self)->priv;
|
||||
MetaRectangle monitor_geometry;
|
||||
|
||||
meta_display_get_monitor_geometry (meta_screen_get_display (priv->screen),
|
||||
meta_display_get_monitor_geometry (priv->display,
|
||||
priv->monitor,
|
||||
&monitor_geometry);
|
||||
|
||||
@ -384,7 +384,7 @@ setup_pipeline (MetaBackgroundActor *self,
|
||||
MetaRectangle monitor_geometry;
|
||||
float gradient_height_perc;
|
||||
|
||||
meta_display_get_monitor_geometry (meta_screen_get_display (priv->screen),
|
||||
meta_display_get_monitor_geometry (priv->display,
|
||||
priv->monitor, &monitor_geometry);
|
||||
gradient_height_perc = MAX (0.0001, priv->gradient_height / (float)monitor_geometry.height);
|
||||
cogl_pipeline_set_uniform_1f (priv->pipeline,
|
||||
@ -552,8 +552,8 @@ meta_background_actor_set_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_META_SCREEN:
|
||||
priv->screen = g_value_get_object (value);
|
||||
case PROP_META_DISPLAY:
|
||||
priv->display = g_value_get_object (value);
|
||||
break;
|
||||
case PROP_MONITOR:
|
||||
meta_background_actor_set_monitor (self, g_value_get_int (value));
|
||||
@ -613,8 +613,8 @@ meta_background_actor_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_META_SCREEN:
|
||||
g_value_set_object (value, priv->screen);
|
||||
case PROP_META_DISPLAY:
|
||||
g_value_set_object (value, priv->display);
|
||||
break;
|
||||
case PROP_MONITOR:
|
||||
g_value_set_int (value, priv->monitor);
|
||||
@ -664,14 +664,14 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
|
||||
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
|
||||
actor_class->paint = meta_background_actor_paint;
|
||||
|
||||
param_spec = g_param_spec_object ("meta-screen",
|
||||
"MetaScreen",
|
||||
"MetaScreen",
|
||||
META_TYPE_SCREEN,
|
||||
param_spec = g_param_spec_object ("meta-display",
|
||||
"MetaDisplay",
|
||||
"MetaDisplay",
|
||||
META_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_META_SCREEN,
|
||||
PROP_META_DISPLAY,
|
||||
param_spec);
|
||||
|
||||
param_spec = g_param_spec_int ("monitor",
|
||||
@ -782,13 +782,13 @@ meta_background_actor_init (MetaBackgroundActor *self)
|
||||
* Return value: the newly created background actor
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_background_actor_new (MetaScreen *screen,
|
||||
meta_background_actor_new (MetaDisplay *display,
|
||||
int monitor)
|
||||
{
|
||||
MetaBackgroundActor *self;
|
||||
|
||||
self = g_object_new (META_TYPE_BACKGROUND_ACTOR,
|
||||
"meta-screen", screen,
|
||||
"meta-display", display,
|
||||
"monitor", monitor,
|
||||
NULL);
|
||||
|
||||
@ -927,7 +927,7 @@ meta_background_actor_set_monitor (MetaBackgroundActor *self,
|
||||
MetaBackgroundActorPrivate *priv = self->priv;
|
||||
MetaRectangle old_monitor_geometry;
|
||||
MetaRectangle new_monitor_geometry;
|
||||
MetaDisplay *display = meta_screen_get_display (priv->screen);
|
||||
MetaDisplay *display = priv->display;
|
||||
|
||||
if(priv->monitor == monitor)
|
||||
return;
|
||||
|
@ -26,9 +26,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// XXX: Remove this once transition to MetaDisplay has been completed
|
||||
#include "core/display-private.h"
|
||||
|
||||
enum
|
||||
{
|
||||
CHANGED,
|
||||
|
@ -23,7 +23,6 @@
|
||||
#define META_PLUGIN_MANAGER_H_
|
||||
|
||||
#include <meta/types.h>
|
||||
#include <meta/screen.h>
|
||||
#include <meta/meta-plugin.h>
|
||||
|
||||
typedef enum {
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include <meta/meta-plugin.h>
|
||||
#include "meta-plugin-manager.h"
|
||||
#include <meta/screen.h>
|
||||
#include <meta/display.h>
|
||||
#include <meta/util.h>
|
||||
|
||||
@ -191,19 +190,19 @@ meta_plugin_end_modal (MetaPlugin *plugin,
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_get_screen:
|
||||
* meta_plugin_get_display:
|
||||
* @plugin: a #MetaPlugin
|
||||
*
|
||||
* Gets the #MetaScreen corresponding to a plugin.
|
||||
* Gets the #MetaDisplay corresponding to a plugin.
|
||||
*
|
||||
* Return value: (transfer none): the #MetaScreen for the plugin
|
||||
* Return value: (transfer none): the #MetaDisplay for the plugin
|
||||
*/
|
||||
MetaScreen *
|
||||
meta_plugin_get_screen (MetaPlugin *plugin)
|
||||
MetaDisplay *
|
||||
meta_plugin_get_display (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return priv->compositor->display->screen;
|
||||
return priv->compositor->display;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <meta/meta-window-group.h>
|
||||
|
||||
#include <meta/screen.h>
|
||||
#include <meta/display.h>
|
||||
|
||||
/**
|
||||
* MetaWindowGroup:
|
||||
@ -19,6 +19,6 @@
|
||||
|
||||
typedef struct _MetaWindowGroupPrivate MetaWindowGroupPrivate;
|
||||
|
||||
ClutterActor *meta_window_group_new (MetaScreen *screen);
|
||||
ClutterActor *meta_window_group_new (MetaDisplay *display);
|
||||
|
||||
#endif /* META_WINDOW_GROUP_PRIVATE_H */
|
||||
|
@ -24,7 +24,7 @@ struct _MetaWindowGroup
|
||||
{
|
||||
ClutterActor parent;
|
||||
|
||||
MetaScreen *screen;
|
||||
MetaDisplay *display;
|
||||
};
|
||||
|
||||
static void cullable_iface_init (MetaCullableInterface *iface);
|
||||
@ -65,7 +65,7 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
|
||||
ClutterActor *stage = clutter_actor_get_stage (actor);
|
||||
|
||||
meta_display_get_size (window_group->screen->display, &screen_width, &screen_height);
|
||||
meta_display_get_size (window_group->display, &screen_width, &screen_height);
|
||||
|
||||
/* Normally we expect an actor to be drawn at it's position on the screen.
|
||||
* However, if we're inside the paint of a ClutterClone, that won't be the
|
||||
@ -200,13 +200,13 @@ meta_window_group_init (MetaWindowGroup *window_group)
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_window_group_new (MetaScreen *screen)
|
||||
meta_window_group_new (MetaDisplay *display)
|
||||
{
|
||||
MetaWindowGroup *window_group;
|
||||
|
||||
window_group = g_object_new (META_TYPE_WINDOW_GROUP, NULL);
|
||||
|
||||
window_group->screen = screen;
|
||||
window_group->display = display;
|
||||
|
||||
return CLUTTER_ACTOR (window_group);
|
||||
}
|
||||
|
@ -33,16 +33,13 @@
|
||||
#include <gmodule.h>
|
||||
#include <string.h>
|
||||
|
||||
// XXX: Remove this once transition to MetaDisplay has been completed
|
||||
#include "core/display-private.h"
|
||||
|
||||
#define DESTROY_TIMEOUT 100
|
||||
#define MINIMIZE_TIMEOUT 250
|
||||
#define MAP_TIMEOUT 250
|
||||
#define SWITCH_TIMEOUT 500
|
||||
|
||||
#define ACTOR_DATA_KEY "MCCP-Default-actor-data"
|
||||
#define SCREEN_TILE_PREVIEW_DATA_KEY "MCCP-Default-screen-tile-preview-data"
|
||||
#define DISPLAY_TILE_PREVIEW_DATA_KEY "MCCP-Default-display-tile-preview-data"
|
||||
|
||||
#define META_TYPE_DEFAULT_PLUGIN (meta_default_plugin_get_type ())
|
||||
#define META_DEFAULT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPlugin))
|
||||
@ -71,7 +68,7 @@ struct _MetaDefaultPluginClass
|
||||
};
|
||||
|
||||
static GQuark actor_data_quark = 0;
|
||||
static GQuark screen_tile_preview_data_quark = 0;
|
||||
static GQuark display_tile_preview_data_quark = 0;
|
||||
|
||||
static void start (MetaPlugin *plugin);
|
||||
static void minimize (MetaPlugin *plugin,
|
||||
@ -138,14 +135,14 @@ typedef struct
|
||||
} EffectCompleteData;
|
||||
|
||||
|
||||
typedef struct _ScreenTilePreview
|
||||
typedef struct _DisplayTilePreview
|
||||
{
|
||||
ClutterActor *actor;
|
||||
|
||||
GdkRGBA *preview_color;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
} ScreenTilePreview;
|
||||
} DisplayTilePreview;
|
||||
|
||||
static void
|
||||
meta_default_plugin_dispose (GObject *object)
|
||||
@ -289,8 +286,8 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
||||
{
|
||||
MetaPlugin *plugin = META_PLUGIN (data);
|
||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
GList *l = meta_get_window_actors (screen);
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
GList *l = meta_get_window_actors (display);
|
||||
|
||||
while (l)
|
||||
{
|
||||
@ -325,14 +322,13 @@ static void
|
||||
on_monitors_changed (MetaDisplay *display,
|
||||
MetaPlugin *plugin)
|
||||
{
|
||||
MetaScreen *screen = display->screen;
|
||||
MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
|
||||
int i, n;
|
||||
GRand *rand = g_rand_new_with_seed (123456);
|
||||
|
||||
clutter_actor_destroy_all_children (self->priv->background_group);
|
||||
|
||||
n = meta_display_get_n_monitors (meta_screen_get_display (screen));
|
||||
n = meta_display_get_n_monitors (display);
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
@ -340,10 +336,9 @@ on_monitors_changed (MetaDisplay *display,
|
||||
MetaBackground *background;
|
||||
ClutterColor color;
|
||||
|
||||
meta_display_get_monitor_geometry (meta_screen_get_display (screen),
|
||||
i, &rect);
|
||||
meta_display_get_monitor_geometry (display, i, &rect);
|
||||
|
||||
background_actor = meta_background_actor_new (screen, i);
|
||||
background_actor = meta_background_actor_new (display, i);
|
||||
|
||||
clutter_actor_set_position (background_actor, rect.x, rect.y);
|
||||
clutter_actor_set_size (background_actor, rect.width, rect.height);
|
||||
@ -378,18 +373,18 @@ static void
|
||||
start (MetaPlugin *plugin)
|
||||
{
|
||||
MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
|
||||
self->priv->background_group = meta_background_group_new ();
|
||||
clutter_actor_insert_child_below (meta_get_window_group_for_screen (screen),
|
||||
clutter_actor_insert_child_below (meta_get_window_group_for_display (display),
|
||||
self->priv->background_group, NULL);
|
||||
|
||||
g_signal_connect (display, "monitors-changed",
|
||||
G_CALLBACK (on_monitors_changed), plugin);
|
||||
|
||||
on_monitors_changed (display, plugin);
|
||||
|
||||
clutter_actor_show (meta_get_stage_for_screen (screen));
|
||||
clutter_actor_show (meta_get_stage_for_display (display));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -397,7 +392,6 @@ switch_workspace (MetaPlugin *plugin,
|
||||
gint from, gint to,
|
||||
MetaMotionDirection direction)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
MetaDisplay *display;
|
||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||
GList *l;
|
||||
@ -406,9 +400,8 @@ switch_workspace (MetaPlugin *plugin,
|
||||
ClutterActor *stage;
|
||||
int screen_width, screen_height;
|
||||
|
||||
screen = meta_plugin_get_screen (plugin);
|
||||
display = meta_screen_get_display (screen);
|
||||
stage = meta_get_stage_for_screen (screen);
|
||||
display = meta_plugin_get_display (plugin);
|
||||
stage = meta_get_stage_for_display (display);
|
||||
|
||||
meta_display_get_size (display,
|
||||
&screen_width,
|
||||
@ -430,7 +423,7 @@ switch_workspace (MetaPlugin *plugin,
|
||||
return;
|
||||
}
|
||||
|
||||
l = g_list_last (meta_get_window_actors (screen));
|
||||
l = g_list_last (meta_get_window_actors (display));
|
||||
|
||||
while (l)
|
||||
{
|
||||
@ -678,36 +671,36 @@ destroy (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
||||
* Tile preview private data accessor
|
||||
*/
|
||||
static void
|
||||
free_screen_tile_preview (gpointer data)
|
||||
free_display_tile_preview (gpointer data)
|
||||
{
|
||||
ScreenTilePreview *preview = data;
|
||||
DisplayTilePreview *preview = data;
|
||||
|
||||
if (G_LIKELY (preview != NULL)) {
|
||||
clutter_actor_destroy (preview->actor);
|
||||
g_slice_free (ScreenTilePreview, preview);
|
||||
g_slice_free (DisplayTilePreview, preview);
|
||||
}
|
||||
}
|
||||
|
||||
static ScreenTilePreview *
|
||||
get_screen_tile_preview (MetaScreen *screen)
|
||||
static DisplayTilePreview *
|
||||
get_display_tile_preview (MetaDisplay *display)
|
||||
{
|
||||
ScreenTilePreview *preview = g_object_get_qdata (G_OBJECT (screen), screen_tile_preview_data_quark);
|
||||
DisplayTilePreview *preview = g_object_get_qdata (G_OBJECT (display), display_tile_preview_data_quark);
|
||||
|
||||
if (G_UNLIKELY (screen_tile_preview_data_quark == 0))
|
||||
screen_tile_preview_data_quark = g_quark_from_static_string (SCREEN_TILE_PREVIEW_DATA_KEY);
|
||||
if (G_UNLIKELY (display_tile_preview_data_quark == 0))
|
||||
display_tile_preview_data_quark = g_quark_from_static_string (DISPLAY_TILE_PREVIEW_DATA_KEY);
|
||||
|
||||
if (G_UNLIKELY (!preview))
|
||||
{
|
||||
preview = g_slice_new0 (ScreenTilePreview);
|
||||
preview = g_slice_new0 (DisplayTilePreview);
|
||||
|
||||
preview->actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (preview->actor, CLUTTER_COLOR_Blue);
|
||||
clutter_actor_set_opacity (preview->actor, 100);
|
||||
|
||||
clutter_actor_add_child (meta_get_window_group_for_screen (screen), preview->actor);
|
||||
g_object_set_qdata_full (G_OBJECT (screen),
|
||||
screen_tile_preview_data_quark, preview,
|
||||
free_screen_tile_preview);
|
||||
clutter_actor_add_child (meta_get_window_group_for_display (display), preview->actor);
|
||||
g_object_set_qdata_full (G_OBJECT (display),
|
||||
display_tile_preview_data_quark, preview,
|
||||
free_display_tile_preview);
|
||||
}
|
||||
|
||||
return preview;
|
||||
@ -719,8 +712,8 @@ show_tile_preview (MetaPlugin *plugin,
|
||||
MetaRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
ScreenTilePreview *preview = get_screen_tile_preview (screen);
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
DisplayTilePreview *preview = get_display_tile_preview (display);
|
||||
ClutterActor *window_actor;
|
||||
|
||||
if (clutter_actor_is_visible (preview->actor)
|
||||
@ -746,8 +739,8 @@ show_tile_preview (MetaPlugin *plugin,
|
||||
static void
|
||||
hide_tile_preview (MetaPlugin *plugin)
|
||||
{
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
ScreenTilePreview *preview = get_screen_tile_preview (screen);
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
DisplayTilePreview *preview = get_display_tile_preview (display);
|
||||
|
||||
clutter_actor_hide (preview->actor);
|
||||
}
|
||||
|
@ -49,7 +49,6 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "bell.h"
|
||||
#include "screen-private.h"
|
||||
#include "window-private.h"
|
||||
#include "util-private.h"
|
||||
#include "compositor/compositor-private.h"
|
||||
@ -74,7 +73,7 @@
|
||||
static void
|
||||
bell_flash_fullscreen (MetaDisplay *display)
|
||||
{
|
||||
meta_compositor_flash_screen (display->compositor, display->screen);
|
||||
meta_compositor_flash_display (display->compositor, display);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -220,14 +220,10 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDisplay *display;
|
||||
MetaScreen *screen;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
screen = display->screen;
|
||||
|
||||
g_assert (screen != NULL);
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
return meta_display_begin_grab_op (display, window,
|
||||
op, pointer_already_grabbed,
|
||||
frame_action,
|
||||
button, modmask,
|
||||
|
@ -147,7 +147,6 @@ struct _MetaDisplay
|
||||
guint focused_by_us : 1;
|
||||
|
||||
/*< private-ish >*/
|
||||
MetaScreen *screen;
|
||||
GHashTable *stamps;
|
||||
GHashTable *wayland_windows;
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "events.h"
|
||||
#include "util-private.h"
|
||||
#include <meta/main.h>
|
||||
#include "screen-private.h"
|
||||
#include "window-private.h"
|
||||
#include "boxes-private.h"
|
||||
#include "frame.h"
|
||||
@ -317,7 +316,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_SCREEN,
|
||||
META_TYPE_DISPLAY,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
@ -328,7 +327,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_SCREEN,
|
||||
META_TYPE_DISPLAY,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
@ -709,7 +708,6 @@ meta_display_open (void)
|
||||
GError *error = NULL;
|
||||
MetaDisplay *display;
|
||||
MetaX11Display *x11_display;
|
||||
MetaScreen *screen;
|
||||
int i;
|
||||
guint32 timestamp;
|
||||
Window old_active_xwindow = None;
|
||||
@ -726,7 +724,6 @@ meta_display_open (void)
|
||||
display->autoraise_timeout_id = 0;
|
||||
display->autoraise_window = NULL;
|
||||
display->focus_window = NULL;
|
||||
display->screen = NULL;
|
||||
display->x11_display = NULL;
|
||||
|
||||
display->rect.x = display->rect.y = 0;
|
||||
@ -815,23 +812,6 @@ meta_display_open (void)
|
||||
display->last_user_time = timestamp;
|
||||
display->compositor = NULL;
|
||||
|
||||
/* Mutter used to manage all X screens of the display in a single process, but
|
||||
* now it always manages exactly one screen - the default screen retrieved
|
||||
* from GDK.
|
||||
*/
|
||||
screen = meta_screen_new (display, timestamp);
|
||||
|
||||
if (!screen)
|
||||
{
|
||||
/* This would typically happen because all the screens already
|
||||
* have window managers.
|
||||
*/
|
||||
meta_display_close (display, timestamp);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
display->screen = screen;
|
||||
|
||||
if (!meta_is_wayland_compositor ())
|
||||
meta_prop_get_window (display->x11_display,
|
||||
display->x11_display->xroot,
|
||||
@ -1031,10 +1011,6 @@ meta_display_close (MetaDisplay *display,
|
||||
/* Stop caring about events */
|
||||
meta_display_free_events (display);
|
||||
|
||||
if (display->screen)
|
||||
meta_screen_free (display->screen, timestamp);
|
||||
display->screen = NULL;
|
||||
|
||||
/* Must be after all calls to meta_window_unmanage() since they
|
||||
* unregister windows
|
||||
*/
|
||||
@ -1691,7 +1667,6 @@ get_event_route_from_grab_op (MetaGrabOp op)
|
||||
|
||||
gboolean
|
||||
meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
@ -1821,7 +1796,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
}
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
|
||||
screen, display->grab_window, display->grab_op);
|
||||
display, display->grab_window, display->grab_op);
|
||||
|
||||
if (display->event_route == META_EVENT_ROUTE_WINDOW_OP)
|
||||
meta_window_grab_op_began (display->grab_window, display->grab_op);
|
||||
@ -1846,7 +1821,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
g_assert (grab_window != NULL);
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||
display->screen, grab_window, grab_op);
|
||||
display, grab_window, grab_op);
|
||||
|
||||
/* We need to reset this early, since the
|
||||
* meta_window_grab_op_ended callback relies on this being
|
||||
@ -2457,17 +2432,6 @@ meta_resize_gravity_from_grab_op (MetaGrabOp op)
|
||||
return gravity;
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_verbose ("Unmanaging screen %d on display %s\n",
|
||||
meta_ui_get_screen_number (),
|
||||
display->x11_display->name);
|
||||
meta_display_close (display, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_manage_all_windows (MetaDisplay *display)
|
||||
{
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include <meta/errors.h>
|
||||
#include "edge-resistance.h"
|
||||
#include "frame.h"
|
||||
#include "screen-private.h"
|
||||
#include <meta/prefs.h>
|
||||
#include "meta-accel-parse.h"
|
||||
|
||||
@ -170,17 +169,14 @@ meta_key_binding_is_builtin (MetaKeyBinding *binding)
|
||||
*/
|
||||
|
||||
static gboolean process_mouse_move_resize_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event);
|
||||
|
||||
static gboolean process_keyboard_move_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event);
|
||||
|
||||
static gboolean process_keyboard_resize_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event);
|
||||
|
||||
@ -1584,7 +1580,6 @@ meta_window_ungrab_keys (MetaWindow *window)
|
||||
|
||||
static void
|
||||
handle_external_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -1861,21 +1856,20 @@ is_modifier (xkb_keysym_t keysym)
|
||||
|
||||
static void
|
||||
invoke_handler (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaKeyHandler *handler,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (handler->func)
|
||||
(* handler->func) (display, screen,
|
||||
(* handler->func) (display,
|
||||
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
||||
window : NULL,
|
||||
event,
|
||||
binding,
|
||||
handler->user_data);
|
||||
else
|
||||
(* handler->default_func) (display, screen,
|
||||
(* handler->default_func) (display,
|
||||
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
||||
window: NULL,
|
||||
event,
|
||||
@ -1885,7 +1879,6 @@ invoke_handler (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_event (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
@ -1935,7 +1928,7 @@ process_event (MetaDisplay *display,
|
||||
*/
|
||||
display->allow_terminal_deactivation = TRUE;
|
||||
|
||||
invoke_handler (display, screen, binding->handler, window, event, binding);
|
||||
invoke_handler (display, binding->handler, window, event, binding);
|
||||
|
||||
return TRUE;
|
||||
|
||||
@ -1947,7 +1940,6 @@ process_event (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_overlay_key (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
ClutterKeyEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
@ -1988,7 +1980,7 @@ process_overlay_key (MetaDisplay *display,
|
||||
* the event. Other clients with global grabs will be out of
|
||||
* luck.
|
||||
*/
|
||||
if (process_event (display, screen, window, event))
|
||||
if (process_event (display, window, event))
|
||||
{
|
||||
/* As normally, after we've handled a global key
|
||||
* binding, we unfreeze the keyboard but keep the grab
|
||||
@ -2073,7 +2065,6 @@ process_overlay_key (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_iso_next_group (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
MetaKeyBindingManager *keys = &display->key_binding_manager;
|
||||
@ -2117,20 +2108,15 @@ process_key_event (MetaDisplay *display,
|
||||
gboolean keep_grab;
|
||||
gboolean all_keys_grabbed;
|
||||
gboolean handled;
|
||||
MetaScreen *screen;
|
||||
|
||||
/* window may be NULL */
|
||||
|
||||
screen = display->screen;
|
||||
|
||||
all_keys_grabbed = window ? window->all_keys_grabbed : FALSE;
|
||||
if (!all_keys_grabbed)
|
||||
{
|
||||
handled = process_overlay_key (display, screen, event, window);
|
||||
handled = process_overlay_key (display, event, window);
|
||||
if (handled)
|
||||
return TRUE;
|
||||
|
||||
handled = process_iso_next_group (display, screen, event);
|
||||
handled = process_iso_next_group (display, event);
|
||||
if (handled)
|
||||
return TRUE;
|
||||
}
|
||||
@ -2164,20 +2150,20 @@ process_key_event (MetaDisplay *display,
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard move\n");
|
||||
keep_grab = process_keyboard_move_grab (display, screen, window, event);
|
||||
keep_grab = process_keyboard_move_grab (display, window, event);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard resize\n");
|
||||
keep_grab = process_keyboard_resize_grab (display, screen, window, event);
|
||||
keep_grab = process_keyboard_resize_grab (display, window, event);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for mouse-only move/resize\n");
|
||||
keep_grab = process_mouse_move_resize_grab (display, screen, window, event);
|
||||
keep_grab = process_mouse_move_resize_grab (display, window, event);
|
||||
}
|
||||
}
|
||||
if (!keep_grab)
|
||||
@ -2187,7 +2173,7 @@ process_key_event (MetaDisplay *display,
|
||||
}
|
||||
|
||||
/* Do the normal keybindings */
|
||||
return process_event (display, screen, window, event);
|
||||
return process_event (display, window, event);
|
||||
}
|
||||
|
||||
/* Handle a key event. May be called recursively: some key events cause
|
||||
@ -2229,7 +2215,6 @@ meta_keybindings_process_event (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_mouse_move_resize_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
@ -2278,7 +2263,6 @@ process_mouse_move_resize_grab (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_keyboard_move_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
@ -2395,7 +2379,6 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_keyboard_resize_grab_op_change (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
@ -2516,7 +2499,6 @@ process_keyboard_resize_grab_op_change (MetaDisplay *display,
|
||||
|
||||
static gboolean
|
||||
process_keyboard_resize_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
@ -2551,7 +2533,7 @@ process_keyboard_resize_grab (MetaDisplay *display,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (process_keyboard_resize_grab_op_change (display, screen, window, event))
|
||||
if (process_keyboard_resize_grab_op_change (display, window, event))
|
||||
return TRUE;
|
||||
|
||||
width = window->rect.width;
|
||||
@ -2746,7 +2728,6 @@ process_keyboard_resize_grab (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_switch_to_last_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -2759,7 +2740,6 @@ handle_switch_to_last_workspace (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_switch_to_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -2795,7 +2775,6 @@ handle_switch_to_workspace (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_maximize_vertically (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -2812,7 +2791,6 @@ handle_maximize_vertically (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_maximize_horizontally (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -2829,7 +2807,6 @@ handle_maximize_horizontally (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_always_on_top (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -2843,7 +2820,6 @@ handle_always_on_top (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_move_to_corner_backend (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
int gravity)
|
||||
{
|
||||
@ -2902,95 +2878,86 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_move_to_corner_nw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, NorthWestGravity);
|
||||
handle_move_to_corner_backend (display, window, NorthWestGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_ne (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, NorthEastGravity);
|
||||
handle_move_to_corner_backend (display, window, NorthEastGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_sw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, SouthWestGravity);
|
||||
handle_move_to_corner_backend (display, window, SouthWestGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_se (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, SouthEastGravity);
|
||||
handle_move_to_corner_backend (display, window, SouthEastGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_n (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, NorthGravity);
|
||||
handle_move_to_corner_backend (display, window, NorthGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_s (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, SouthGravity);
|
||||
handle_move_to_corner_backend (display, window, SouthGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_e (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, EastGravity);
|
||||
handle_move_to_corner_backend (display, window, EastGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_w (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, WestGravity);
|
||||
handle_move_to_corner_backend (display, window, WestGravity);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_center (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3010,7 +2977,6 @@ handle_move_to_center (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_show_desktop (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3029,7 +2995,6 @@ handle_show_desktop (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_panel (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3082,7 +3047,6 @@ handle_panel (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_activate_window_menu (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3108,7 +3072,6 @@ handle_activate_window_menu (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
do_choose_window (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3132,31 +3095,28 @@ do_choose_window (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_switch (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
gboolean backwards = meta_key_binding_is_reversed (binding);
|
||||
do_choose_window (display, screen, event_window, event, binding, backwards);
|
||||
do_choose_window (display, event_window, event, binding, backwards);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_cycle (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *event_window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
gboolean backwards = meta_key_binding_is_reversed (binding);
|
||||
do_choose_window (display, screen, event_window, event, binding, backwards);
|
||||
do_choose_window (display, event_window, event, binding, backwards);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_fullscreen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3170,7 +3130,6 @@ handle_toggle_fullscreen (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_toggle_above (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3184,7 +3143,6 @@ handle_toggle_above (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_toggle_tiled (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3221,7 +3179,6 @@ handle_toggle_tiled (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_toggle_maximized (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3235,7 +3192,6 @@ handle_toggle_maximized (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_maximize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3247,7 +3203,6 @@ handle_maximize (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_unmaximize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3259,7 +3214,6 @@ handle_unmaximize (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_toggle_shaded (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3273,7 +3227,6 @@ handle_toggle_shaded (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_close (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3285,7 +3238,6 @@ handle_close (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_minimize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3297,7 +3249,6 @@ handle_minimize (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_begin_move (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3314,7 +3265,6 @@ handle_begin_move (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_begin_resize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3331,7 +3281,6 @@ handle_begin_resize (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_toggle_on_all_workspaces (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3345,7 +3294,6 @@ handle_toggle_on_all_workspaces (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_move_to_workspace_last (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3365,7 +3313,6 @@ handle_move_to_workspace_last (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_move_to_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3420,7 +3367,6 @@ handle_move_to_workspace (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_move_to_monitor (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3444,7 +3390,6 @@ handle_move_to_monitor (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_raise_or_lower (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3491,7 +3436,6 @@ handle_raise_or_lower (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_raise (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3502,7 +3446,6 @@ handle_raise (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_lower (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3513,7 +3456,6 @@ handle_lower (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_set_spew_mark (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3525,7 +3467,6 @@ handle_set_spew_mark (MetaDisplay *display,
|
||||
#ifdef HAVE_NATIVE_BACKEND
|
||||
static void
|
||||
handle_switch_vt (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3544,7 +3485,6 @@ handle_switch_vt (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_switch_monitor (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3565,7 +3505,6 @@ handle_switch_monitor (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_rotate_monitor (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
@ -3580,7 +3519,6 @@ handle_rotate_monitor (MetaDisplay *display,
|
||||
|
||||
static void
|
||||
handle_restore_shortcuts (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
|
@ -491,8 +491,6 @@ add_constraint (Constraint **constraints,
|
||||
{
|
||||
Constraint *c;
|
||||
|
||||
g_assert (above->screen == below->screen);
|
||||
|
||||
/* check if constraint is a duplicate */
|
||||
c = constraints[below->stack_position];
|
||||
while (c != NULL)
|
||||
@ -553,7 +551,6 @@ create_constraints (Constraint **constraints,
|
||||
MetaWindow *group_window = tmp2->data;
|
||||
|
||||
if (!meta_window_is_in_stack (group_window) ||
|
||||
w->screen != group_window->screen ||
|
||||
group_window->override_redirect)
|
||||
{
|
||||
tmp2 = tmp2->next;
|
||||
@ -1281,8 +1278,6 @@ meta_stack_windows_cmp (MetaStack *stack,
|
||||
MetaWindow *window_a,
|
||||
MetaWindow *window_b)
|
||||
{
|
||||
g_return_val_if_fail (window_a->screen == window_b->screen, 0);
|
||||
|
||||
/* -1 means a below b */
|
||||
|
||||
stack_ensure_sorted (stack); /* update constraints, layers */
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <meta/errors.h>
|
||||
#include "display-private.h"
|
||||
#include "x11/meta-x11-display-private.h"
|
||||
#include "screen-private.h"
|
||||
#include "startup-notification-private.h"
|
||||
|
||||
/* This should be fairly long, as it should never be required unless
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <meta/compositor.h>
|
||||
#include <meta/window.h>
|
||||
#include <meta/meta-close-dialog.h>
|
||||
#include "screen-private.h"
|
||||
#include "backends/meta-logical-monitor.h"
|
||||
#include <meta/util.h>
|
||||
#include "stack.h"
|
||||
#include <X11/Xutil.h>
|
||||
@ -145,7 +145,6 @@ struct _MetaWindow
|
||||
GObject parent_instance;
|
||||
|
||||
MetaDisplay *display;
|
||||
MetaScreen *screen;
|
||||
guint64 stamp;
|
||||
MetaLogicalMonitor *monitor;
|
||||
MetaWorkspace *workspace;
|
||||
@ -586,7 +585,6 @@ struct _MetaWindowClass
|
||||
#define META_WINDOW_ALLOWS_VERTICAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_height < (w)->size_hints.max_height)
|
||||
|
||||
MetaWindow * _meta_window_shared_new (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindowClientType client_type,
|
||||
MetaWaylandSurface *surface,
|
||||
Window xwindow,
|
||||
|
@ -922,7 +922,6 @@ meta_window_calculate_main_logical_monitor (MetaWindow *window)
|
||||
|
||||
MetaWindow *
|
||||
_meta_window_shared_new (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindowClientType client_type,
|
||||
MetaWaylandSurface *surface,
|
||||
Window xwindow,
|
||||
@ -961,9 +960,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->surface = surface;
|
||||
window->xwindow = xwindow;
|
||||
|
||||
/* this is in window->screen->display, but that's too annoying to
|
||||
* type
|
||||
*/
|
||||
window->display = display;
|
||||
meta_display_register_stamp (window->display, &window->stamp, window);
|
||||
|
||||
@ -974,8 +970,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->sync_request_timeout_id = 0;
|
||||
window->sync_request_alarm = None;
|
||||
|
||||
window->screen = screen;
|
||||
|
||||
meta_window_update_sandboxed_app_id (window);
|
||||
meta_window_update_desc (window);
|
||||
|
||||
@ -1314,7 +1308,7 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
|
||||
meta_compositor_add_window (screen->display->compositor, window);
|
||||
meta_compositor_add_window (window->display->compositor, window);
|
||||
window->known_to_compositor = TRUE;
|
||||
|
||||
/* Sync stack changes */
|
||||
@ -1433,7 +1427,7 @@ meta_window_unmanage (MetaWindow *window,
|
||||
/* Make sure to only show window on all workspaces if requested, to
|
||||
* not confuse other window managers that may take over
|
||||
*/
|
||||
if (window->screen->closing && meta_prefs_get_workspaces_only_on_primary ())
|
||||
if (meta_prefs_get_workspaces_only_on_primary ())
|
||||
meta_window_on_all_workspaces_changed (window);
|
||||
|
||||
if (window->fullscreen)
|
||||
@ -1740,9 +1734,6 @@ stackcmp (gconstpointer a, gconstpointer b)
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
|
||||
if (aw->screen != bw->screen)
|
||||
return 0; /* don't care how they sort with respect to each other */
|
||||
else
|
||||
return meta_stack_windows_cmp (aw->display->stack,
|
||||
aw, bw);
|
||||
}
|
||||
@ -3200,11 +3191,8 @@ unmaximize_window_before_freeing (MetaWindow *window)
|
||||
window->rect = window->saved_rect;
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
else if (window->screen->closing /* See bug #358042 */
|
||||
#ifdef HAVE_WAYLAND
|
||||
&& !meta_is_wayland_compositor ()
|
||||
#endif
|
||||
)
|
||||
else if (!meta_is_wayland_compositor ())
|
||||
{
|
||||
/* Do NOT update net_wm_state: this screen is closing,
|
||||
* it likely will be managed by another window manager
|
||||
@ -3219,6 +3207,7 @@ unmaximize_window_before_freeing (MetaWindow *window)
|
||||
window->saved_rect.width,
|
||||
window->saved_rect.height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -6817,7 +6806,6 @@ meta_window_begin_grab_op (MetaWindow *window,
|
||||
op, &x, &y);
|
||||
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
FALSE,
|
||||
@ -7200,20 +7188,6 @@ meta_window_is_skip_taskbar (MetaWindow *window)
|
||||
return window->skip_taskbar;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_screen:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Gets the #MetaScreen that the window is on.
|
||||
*
|
||||
* Return value: (transfer none): the #MetaScreen for the window
|
||||
*/
|
||||
MetaScreen *
|
||||
meta_window_get_screen (MetaWindow *window)
|
||||
{
|
||||
return window->screen;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_display:
|
||||
* @window: A #MetaWindow
|
||||
@ -8303,7 +8277,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
|
||||
if (op != META_GRAB_OP_WINDOW_BASE)
|
||||
meta_display_begin_grab_op (display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
TRUE,
|
||||
@ -8327,7 +8300,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
if (window->has_move_func)
|
||||
{
|
||||
meta_display_begin_grab_op (display,
|
||||
window->screen,
|
||||
window,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
|
@ -32,21 +32,21 @@
|
||||
#include <meta/meta-window-actor.h>
|
||||
|
||||
/* Public compositor API */
|
||||
ClutterActor *meta_get_stage_for_screen (MetaScreen *screen);
|
||||
Window meta_get_overlay_window (MetaScreen *screen);
|
||||
GList *meta_get_window_actors (MetaScreen *screen);
|
||||
ClutterActor *meta_get_window_group_for_screen (MetaScreen *screen);
|
||||
ClutterActor *meta_get_top_window_group_for_screen (MetaScreen *screen);
|
||||
ClutterActor *meta_get_feedback_group_for_screen (MetaScreen *screen);
|
||||
ClutterActor *meta_get_stage_for_display (MetaDisplay *display);
|
||||
Window meta_get_overlay_window (MetaDisplay *display);
|
||||
GList *meta_get_window_actors (MetaDisplay *display);
|
||||
ClutterActor *meta_get_window_group_for_display (MetaDisplay *display);
|
||||
ClutterActor *meta_get_top_window_group_for_display (MetaDisplay *display);
|
||||
ClutterActor *meta_get_feedback_group_for_display (MetaDisplay *display);
|
||||
|
||||
void meta_disable_unredirect_for_screen (MetaScreen *screen);
|
||||
void meta_enable_unredirect_for_screen (MetaScreen *screen);
|
||||
void meta_disable_unredirect_for_display (MetaDisplay *display);
|
||||
void meta_enable_unredirect_for_display (MetaDisplay *display);
|
||||
|
||||
void meta_set_stage_input_region (MetaScreen *screen,
|
||||
void meta_set_stage_input_region (MetaDisplay *display,
|
||||
XserverRegion region);
|
||||
void meta_empty_stage_input_region (MetaScreen *screen);
|
||||
void meta_focus_stage_window (MetaScreen *screen,
|
||||
void meta_empty_stage_input_region (MetaDisplay *display);
|
||||
void meta_focus_stage_window (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
gboolean meta_stage_is_focused (MetaScreen *screen);
|
||||
gboolean meta_stage_is_focused (MetaDisplay *display);
|
||||
|
||||
#endif
|
||||
|
@ -114,8 +114,8 @@ void meta_compositor_queue_frame_drawn (MetaCompositor *compositor,
|
||||
void meta_compositor_sync_stack (MetaCompositor *compositor,
|
||||
GList *stack);
|
||||
|
||||
void meta_compositor_flash_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void meta_compositor_flash_display (MetaCompositor *compositor,
|
||||
MetaDisplay *display);
|
||||
|
||||
void meta_compositor_show_tile_preview (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
|
@ -104,7 +104,6 @@ MetaWindow* meta_display_get_tab_current (MetaDisplay *display,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
@ -144,10 +143,6 @@ GSList *meta_display_sort_windows_by_stacking (MetaDisplay *display,
|
||||
void meta_display_add_ignored_crossing_serial (MetaDisplay *display,
|
||||
unsigned long serial);
|
||||
|
||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_clear_mouse_mode (MetaDisplay *display);
|
||||
|
||||
void meta_display_freeze_keyboard (MetaDisplay *display,
|
||||
|
@ -22,7 +22,6 @@
|
||||
#define META_BACKGROUND_ACTOR_H
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <meta/screen.h>
|
||||
#include <meta/meta-background.h>
|
||||
|
||||
#include <gsettings-desktop-schemas/gdesktop-enums.h>
|
||||
@ -61,7 +60,7 @@ struct _MetaBackgroundActor
|
||||
|
||||
GType meta_background_actor_get_type (void);
|
||||
|
||||
ClutterActor *meta_background_actor_new (MetaScreen *screen,
|
||||
ClutterActor *meta_background_actor_new (MetaDisplay *display,
|
||||
int monitor);
|
||||
|
||||
void meta_background_actor_set_background (MetaBackgroundActor *self,
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <gsettings-desktop-schemas/gdesktop-enums.h>
|
||||
#include <meta/screen.h>
|
||||
|
||||
/**
|
||||
* MetaBackground:
|
||||
|
@ -39,7 +39,7 @@ typedef struct _MetaCursorTrackerClass MetaCursorTrackerClass;
|
||||
|
||||
GType meta_cursor_tracker_get_type (void);
|
||||
|
||||
MetaCursorTracker *meta_cursor_tracker_get_for_screen (MetaScreen *screen);
|
||||
MetaCursorTracker *meta_cursor_tracker_get_for_display (MetaDisplay *display);
|
||||
|
||||
void meta_cursor_tracker_get_hot (MetaCursorTracker *tracker,
|
||||
int *x,
|
||||
|
@ -421,7 +421,7 @@ void
|
||||
meta_plugin_end_modal (MetaPlugin *plugin,
|
||||
guint32 timestamp);
|
||||
|
||||
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
|
||||
MetaDisplay *meta_plugin_get_display (MetaPlugin *plugin);
|
||||
|
||||
void _meta_plugin_set_compositor (MetaPlugin *plugin, MetaCompositor *compositor);
|
||||
|
||||
|
@ -384,7 +384,6 @@ typedef enum
|
||||
/**
|
||||
* MetaKeyHandlerFunc:
|
||||
* @display: a #MetaDisplay
|
||||
* @screen: a #MetaScreen
|
||||
* @window: a #MetaWindow
|
||||
* @event: (type gpointer): a #ClutterKeyEvent
|
||||
* @binding: a #MetaKeyBinding
|
||||
@ -392,7 +391,6 @@ typedef enum
|
||||
*
|
||||
*/
|
||||
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
|
@ -119,7 +119,6 @@ void meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
MetaRectangle *frame_rect,
|
||||
MetaRectangle *client_rect);
|
||||
|
||||
MetaScreen *meta_window_get_screen (MetaWindow *window);
|
||||
MetaDisplay *meta_window_get_display (MetaWindow *window);
|
||||
Window meta_window_get_xwindow (MetaWindow *window);
|
||||
MetaWindowType meta_window_get_window_type (MetaWindow *window);
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include <meta/types.h>
|
||||
#include <meta/boxes.h>
|
||||
#include <meta/screen.h>
|
||||
|
||||
#define META_TYPE_WORKSPACE (meta_workspace_get_type ())
|
||||
#define META_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WORKSPACE, MetaWorkspace))
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "meta-wayland-cursor-surface.h"
|
||||
#include "meta-wayland-buffer.h"
|
||||
#include "meta-xwayland.h"
|
||||
#include "screen-private.h"
|
||||
#include "meta-wayland-private.h"
|
||||
#include "backends/meta-backend-private.h"
|
||||
#include "backends/meta-logical-monitor.h"
|
||||
|
@ -190,7 +190,6 @@ meta_wayland_popup_grab_begin (MetaWaylandPopupGrab *grab,
|
||||
|
||||
meta_wayland_pointer_start_grab (pointer, (MetaWaylandPointerGrab*)grab);
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
META_GRAB_OP_WAYLAND_POPUP,
|
||||
FALSE, /* pointer_already_grabbed */
|
||||
|
@ -1273,7 +1273,6 @@ meta_wayland_surface_begin_grab_op (MetaWaylandSurface *surface,
|
||||
constrain it in the same way as it would be if the window was
|
||||
being moved/resized via a SSD event. */
|
||||
return meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
grab_op,
|
||||
TRUE, /* pointer_already_grabbed */
|
||||
|
@ -594,7 +594,6 @@ meta_window_wayland_new (MetaDisplay *display,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
XWindowAttributes attrs = { 0 };
|
||||
MetaScreen *scr = display->screen;
|
||||
MetaWindow *window;
|
||||
|
||||
/*
|
||||
@ -620,7 +619,6 @@ meta_window_wayland_new (MetaDisplay *display,
|
||||
*/
|
||||
|
||||
window = _meta_window_shared_new (display,
|
||||
scr,
|
||||
META_WINDOW_CLIENT_TYPE_WAYLAND,
|
||||
surface,
|
||||
None,
|
||||
|
@ -1160,8 +1160,7 @@ process_selection_clear (MetaX11Display *x11_display,
|
||||
meta_verbose ("Got selection clear for on display %s\n",
|
||||
x11_display->name);
|
||||
|
||||
meta_display_unmanage_screen (x11_display->display,
|
||||
x11_display->display->screen,
|
||||
meta_display_close (x11_display->display,
|
||||
event->xselectionclear.time);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -2316,7 +2316,7 @@ meta_window_x11_property_notify (MetaWindow *window,
|
||||
static int
|
||||
query_pressed_buttons (MetaWindow *window)
|
||||
{
|
||||
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (window->screen);
|
||||
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_display (window->display);
|
||||
ClutterModifierType mods;
|
||||
int button = 0;
|
||||
|
||||
@ -2705,7 +2705,6 @@ meta_window_x11_client_message (MetaWindow *window,
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Beginning move/resize with button = %d\n", button);
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
FALSE,
|
||||
@ -3032,7 +3031,6 @@ meta_window_x11_new (MetaDisplay *display,
|
||||
MetaCompEffect effect)
|
||||
{
|
||||
MetaX11Display *x11_display = display->x11_display;
|
||||
MetaScreen *screen = display->screen;
|
||||
XWindowAttributes attrs;
|
||||
gulong existing_wm_state;
|
||||
MetaWindow *window = NULL;
|
||||
@ -3170,7 +3168,6 @@ meta_window_x11_new (MetaDisplay *display,
|
||||
}
|
||||
|
||||
window = _meta_window_shared_new (display,
|
||||
screen,
|
||||
META_WINDOW_CLIENT_TYPE_X11,
|
||||
NULL,
|
||||
xwindow,
|
||||
|
Loading…
Reference in New Issue
Block a user