actor/x11: Remove unused shadow properties
The actor is an internal implementation detail and nothing changes the value of those properties Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3979>
This commit is contained in:
parent
3bc2ab7a6a
commit
0104fbe577
2 changed files with 17 additions and 129 deletions
|
@ -41,12 +41,6 @@
|
||||||
#include "x11/meta-x11-frame.h"
|
#include "x11/meta-x11-frame.h"
|
||||||
#include "x11/window-x11-private.h"
|
#include "x11/window-x11-private.h"
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_SHADOW_MODE = 1,
|
|
||||||
PROP_SHADOW_CLASS
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _MetaWindowActorX11
|
struct _MetaWindowActorX11
|
||||||
{
|
{
|
||||||
MetaWindowActor parent;
|
MetaWindowActor parent;
|
||||||
|
@ -83,12 +77,9 @@ struct _MetaWindowActorX11
|
||||||
|
|
||||||
/* Extracted size-invariant shape used for shadows */
|
/* Extracted size-invariant shape used for shadows */
|
||||||
MetaWindowShape *shadow_shape;
|
MetaWindowShape *shadow_shape;
|
||||||
char *shadow_class;
|
|
||||||
|
|
||||||
MetaShadowFactory *shadow_factory;
|
MetaShadowFactory *shadow_factory;
|
||||||
|
|
||||||
MetaShadowMode shadow_mode;
|
|
||||||
|
|
||||||
gboolean needs_reshape;
|
gboolean needs_reshape;
|
||||||
gboolean recompute_focused_shadow;
|
gboolean recompute_focused_shadow;
|
||||||
gboolean recompute_unfocused_shadow;
|
gboolean recompute_unfocused_shadow;
|
||||||
|
@ -390,11 +381,6 @@ has_shadow (MetaWindowActorX11 *actor_x11)
|
||||||
MetaWindowX11Private *priv =
|
MetaWindowX11Private *priv =
|
||||||
meta_window_x11_get_private (x11_window);
|
meta_window_x11_get_private (x11_window);
|
||||||
|
|
||||||
if (actor_x11->shadow_mode == META_SHADOW_MODE_FORCED_OFF)
|
|
||||||
return FALSE;
|
|
||||||
if (actor_x11->shadow_mode == META_SHADOW_MODE_FORCED_ON)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
/* Leaving out shadows for maximized and fullscreen windows is an efficiency
|
/* Leaving out shadows for maximized and fullscreen windows is an efficiency
|
||||||
* win and also prevents the unsightly effect of the shadow of maximized
|
* win and also prevents the unsightly effect of the shadow of maximized
|
||||||
* window appearing on an adjacent window */
|
* window appearing on an adjacent window */
|
||||||
|
@ -483,32 +469,25 @@ meta_window_actor_x11_set_unredirected (MetaWindowActorX11 *actor_x11,
|
||||||
static const char *
|
static const char *
|
||||||
get_shadow_class (MetaWindowActorX11 *actor_x11)
|
get_shadow_class (MetaWindowActorX11 *actor_x11)
|
||||||
{
|
{
|
||||||
if (actor_x11->shadow_class)
|
MetaWindow *window =
|
||||||
{
|
meta_window_actor_get_meta_window (META_WINDOW_ACTOR (actor_x11));
|
||||||
return actor_x11->shadow_class;
|
MetaWindowType window_type;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MetaWindow *window =
|
|
||||||
meta_window_actor_get_meta_window (META_WINDOW_ACTOR (actor_x11));
|
|
||||||
MetaWindowType window_type;
|
|
||||||
|
|
||||||
window_type = meta_window_get_window_type (window);
|
window_type = meta_window_get_window_type (window);
|
||||||
switch (window_type)
|
switch (window_type)
|
||||||
{
|
{
|
||||||
case META_WINDOW_DROPDOWN_MENU:
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
case META_WINDOW_COMBO:
|
case META_WINDOW_COMBO:
|
||||||
return "dropdown-menu";
|
return "dropdown-menu";
|
||||||
case META_WINDOW_POPUP_MENU:
|
case META_WINDOW_POPUP_MENU:
|
||||||
return "popup-menu";
|
return "popup-menu";
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
MetaFrameType frame_type;
|
MetaFrameType frame_type;
|
||||||
|
|
||||||
frame_type = meta_window_get_frame_type (window);
|
frame_type = meta_window_get_frame_type (window);
|
||||||
return meta_frame_type_to_string (frame_type);
|
return meta_frame_type_to_string (frame_type);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,69 +1427,6 @@ meta_window_actor_x11_sync_geometry (MetaWindowActor *actor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_x11_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
MetaWindowActorX11 *actor_x11 = META_WINDOW_ACTOR_X11 (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_SHADOW_MODE:
|
|
||||||
{
|
|
||||||
MetaShadowMode newv = g_value_get_enum (value);
|
|
||||||
|
|
||||||
if (newv == actor_x11->shadow_mode)
|
|
||||||
return;
|
|
||||||
|
|
||||||
actor_x11->shadow_mode = newv;
|
|
||||||
|
|
||||||
invalidate_shadow (actor_x11);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PROP_SHADOW_CLASS:
|
|
||||||
{
|
|
||||||
const char *newv = g_value_get_string (value);
|
|
||||||
|
|
||||||
if (g_strcmp0 (newv, actor_x11->shadow_class) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_free (actor_x11->shadow_class);
|
|
||||||
actor_x11->shadow_class = g_strdup (newv);
|
|
||||||
|
|
||||||
invalidate_shadow (actor_x11);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_x11_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
MetaWindowActorX11 *actor_x11 = META_WINDOW_ACTOR_X11 (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_SHADOW_MODE:
|
|
||||||
g_value_set_enum (value, actor_x11->shadow_mode);
|
|
||||||
break;
|
|
||||||
case PROP_SHADOW_CLASS:
|
|
||||||
g_value_set_string (value, actor_x11->shadow_class);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_actor_x11_constructed (GObject *object)
|
meta_window_actor_x11_constructed (GObject *object)
|
||||||
{
|
{
|
||||||
|
@ -1586,7 +1502,6 @@ meta_window_actor_x11_dispose (GObject *object)
|
||||||
g_clear_pointer (&actor_x11->shadow_clip, mtk_region_unref);
|
g_clear_pointer (&actor_x11->shadow_clip, mtk_region_unref);
|
||||||
g_clear_pointer (&actor_x11->frame_bounds, mtk_region_unref);
|
g_clear_pointer (&actor_x11->frame_bounds, mtk_region_unref);
|
||||||
|
|
||||||
g_clear_pointer (&actor_x11->shadow_class, g_free);
|
|
||||||
g_clear_pointer (&actor_x11->focused_shadow, meta_shadow_unref);
|
g_clear_pointer (&actor_x11->focused_shadow, meta_shadow_unref);
|
||||||
g_clear_pointer (&actor_x11->unfocused_shadow, meta_shadow_unref);
|
g_clear_pointer (&actor_x11->unfocused_shadow, meta_shadow_unref);
|
||||||
g_clear_pointer (&actor_x11->shadow_shape, meta_window_shape_unref);
|
g_clear_pointer (&actor_x11->shadow_shape, meta_window_shape_unref);
|
||||||
|
@ -1600,7 +1515,6 @@ meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||||
MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
|
MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
|
||||||
GParamSpec *pspec;
|
|
||||||
|
|
||||||
window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
|
window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
|
||||||
window_actor_class->get_scanout_candidate = meta_window_actor_x11_get_scanout_candidate;
|
window_actor_class->get_scanout_candidate = meta_window_actor_x11_get_scanout_candidate;
|
||||||
|
@ -1619,26 +1533,7 @@ meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
|
||||||
actor_class->get_paint_volume = meta_window_actor_x11_get_paint_volume;
|
actor_class->get_paint_volume = meta_window_actor_x11_get_paint_volume;
|
||||||
|
|
||||||
object_class->constructed = meta_window_actor_x11_constructed;
|
object_class->constructed = meta_window_actor_x11_constructed;
|
||||||
object_class->set_property = meta_window_actor_x11_set_property;
|
|
||||||
object_class->get_property = meta_window_actor_x11_get_property;
|
|
||||||
object_class->dispose = meta_window_actor_x11_dispose;
|
object_class->dispose = meta_window_actor_x11_dispose;
|
||||||
|
|
||||||
pspec = g_param_spec_enum ("shadow-mode", NULL, NULL,
|
|
||||||
META_TYPE_SHADOW_MODE,
|
|
||||||
META_SHADOW_MODE_AUTO,
|
|
||||||
G_PARAM_READWRITE);
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_SHADOW_MODE,
|
|
||||||
pspec);
|
|
||||||
|
|
||||||
pspec = g_param_spec_string ("shadow-class", NULL, NULL,
|
|
||||||
NULL,
|
|
||||||
G_PARAM_READWRITE);
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_SHADOW_CLASS,
|
|
||||||
pspec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -60,10 +60,3 @@ void meta_window_actor_freeze (MetaWindowActor *self);
|
||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
void meta_window_actor_thaw (MetaWindowActor *self);
|
void meta_window_actor_thaw (MetaWindowActor *self);
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
META_SHADOW_MODE_AUTO,
|
|
||||||
META_SHADOW_MODE_FORCED_OFF,
|
|
||||||
META_SHADOW_MODE_FORCED_ON,
|
|
||||||
} MetaShadowMode;
|
|
||||||
|
|
Loading…
Reference in a new issue