[metacity] compositor: add window_opacity_changed
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor: add window_opacity_changed
- Date: Mon, 6 Mar 2017 15:51:12 +0000 (UTC)
commit 5d89bb7e69297a1f3355995cba8c92339a51540b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Mar 6 10:51:33 2017 +0200
compositor: add window_opacity_changed
src/compositor/meta-compositor-none.c | 7 +++
src/compositor/meta-compositor-private.h | 65 +++++++++++++++--------------
src/compositor/meta-compositor-xrender.c | 7 +++
src/compositor/meta-compositor.c | 11 +++++
src/include/meta-compositor.h | 63 +++++++++++++++--------------
5 files changed, 92 insertions(+), 61 deletions(-)
---
diff --git a/src/compositor/meta-compositor-none.c b/src/compositor/meta-compositor-none.c
index 9f84ec9..e39121d 100644
--- a/src/compositor/meta-compositor-none.c
+++ b/src/compositor/meta-compositor-none.c
@@ -65,6 +65,12 @@ meta_compositor_none_hide_window (MetaCompositor *compositor,
}
static void
+meta_compositor_none_window_opacity_changed (MetaCompositor *compositor,
+ MetaWindow *window)
+{
+}
+
+static void
meta_compositor_none_set_updates_frozen (MetaCompositor *compositor,
MetaWindow *window,
gboolean updates_frozen)
@@ -129,6 +135,7 @@ meta_compositor_none_class_init (MetaCompositorNoneClass *none_class)
compositor_class->remove_window = meta_compositor_none_remove_window;
compositor_class->show_window = meta_compositor_none_show_window;
compositor_class->hide_window = meta_compositor_none_hide_window;
+ compositor_class->window_opacity_changed = meta_compositor_none_window_opacity_changed;
compositor_class->set_updates_frozen = meta_compositor_none_set_updates_frozen;
compositor_class->process_event = meta_compositor_none_process_event;
compositor_class->get_window_surface = meta_compositor_none_get_window_surface;
diff --git a/src/compositor/meta-compositor-private.h b/src/compositor/meta-compositor-private.h
index 41b973e..b37615f 100644
--- a/src/compositor/meta-compositor-private.h
+++ b/src/compositor/meta-compositor-private.h
@@ -27,50 +27,53 @@ struct _MetaCompositorClass
{
GObjectClass parent_class;
- gboolean (* manage) (MetaCompositor *compositor,
- GError **error);
+ gboolean (* manage) (MetaCompositor *compositor,
+ GError **error);
- void (* unmanage) (MetaCompositor *compositor);
+ void (* unmanage) (MetaCompositor *compositor);
- void (* add_window) (MetaCompositor *compositor,
- MetaWindow *window);
+ void (* add_window) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* remove_window) (MetaCompositor *compositor,
- MetaWindow *window);
+ void (* remove_window) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* show_window) (MetaCompositor *compositor,
- MetaWindow *window,
- MetaEffectType effect);
+ void (* show_window) (MetaCompositor *compositor,
+ MetaWindow *window,
+ MetaEffectType effect);
- void (* hide_window) (MetaCompositor *compositor,
- MetaWindow *window,
- MetaEffectType effect);
+ void (* hide_window) (MetaCompositor *compositor,
+ MetaWindow *window,
+ MetaEffectType effect);
- void (* set_updates_frozen) (MetaCompositor *compositor,
- MetaWindow *window,
- gboolean updates_frozen);
+ void (* window_opacity_changed) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* process_event) (MetaCompositor *compositor,
- XEvent *event,
- MetaWindow *window);
+ void (* set_updates_frozen) (MetaCompositor *compositor,
+ MetaWindow *window,
+ gboolean updates_frozen);
- cairo_surface_t * (* get_window_surface) (MetaCompositor *compositor,
- MetaWindow *window);
+ void (* process_event) (MetaCompositor *compositor,
+ XEvent *event,
+ MetaWindow *window);
- void (* set_active_window) (MetaCompositor *compositor,
- MetaWindow *window);
+ cairo_surface_t * (* get_window_surface) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* maximize_window) (MetaCompositor *compositor,
- MetaWindow *window);
+ void (* set_active_window) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* unmaximize_window) (MetaCompositor *compositor,
- MetaWindow *window);
+ void (* maximize_window) (MetaCompositor *compositor,
+ MetaWindow *window);
- void (* sync_stack) (MetaCompositor *compositor,
- GList *stack);
+ void (* unmaximize_window) (MetaCompositor *compositor,
+ MetaWindow *window);
- gboolean (* is_our_xwindow) (MetaCompositor *compositor,
- Window xwindow);
+ void (* sync_stack) (MetaCompositor *compositor,
+ GList *stack);
+
+ gboolean (* is_our_xwindow) (MetaCompositor *compositor,
+ Window xwindow);
};
MetaDisplay *meta_compositor_get_display (MetaCompositor *compositor);
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 5a1b7bc..07ea4e5 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -2976,6 +2976,12 @@ meta_compositor_xrender_hide_window (MetaCompositor *compositor,
}
static void
+meta_compositor_xrender_window_opacity_changed (MetaCompositor *compositor,
+ MetaWindow *window)
+{
+}
+
+static void
meta_compositor_xrender_set_updates_frozen (MetaCompositor *compositor,
MetaWindow *window,
gboolean updates_frozen)
@@ -3398,6 +3404,7 @@ meta_compositor_xrender_class_init (MetaCompositorXRenderClass *xrender_class)
compositor_class->remove_window = meta_compositor_xrender_remove_window;
compositor_class->show_window = meta_compositor_xrender_show_window;
compositor_class->hide_window = meta_compositor_xrender_hide_window;
+ compositor_class->window_opacity_changed = meta_compositor_xrender_window_opacity_changed;
compositor_class->set_updates_frozen = meta_compositor_xrender_set_updates_frozen;
compositor_class->process_event = meta_compositor_xrender_process_event;
compositor_class->get_window_surface = meta_compositor_xrender_get_window_surface;
diff --git a/src/compositor/meta-compositor.c b/src/compositor/meta-compositor.c
index bcd29cd..de396ad 100644
--- a/src/compositor/meta-compositor.c
+++ b/src/compositor/meta-compositor.c
@@ -242,6 +242,17 @@ meta_compositor_hide_window (MetaCompositor *compositor,
}
void
+meta_compositor_window_opacity_changed (MetaCompositor *compositor,
+ MetaWindow *window)
+{
+ MetaCompositorClass *compositor_class;
+
+ compositor_class = META_COMPOSITOR_GET_CLASS (compositor);
+
+ compositor_class->window_opacity_changed (compositor, window);
+}
+
+void
meta_compositor_set_updates_frozen (MetaCompositor *compositor,
MetaWindow *window,
gboolean updates_frozen)
diff --git a/src/include/meta-compositor.h b/src/include/meta-compositor.h
index bfdb429..3a216f3 100644
--- a/src/include/meta-compositor.h
+++ b/src/include/meta-compositor.h
@@ -46,48 +46,51 @@ typedef enum
META_EFFECT_TYPE_UNMINIMIZE,
} MetaEffectType;
-MetaCompositor *meta_compositor_new (MetaCompositorType type,
- MetaDisplay *display);
+MetaCompositor *meta_compositor_new (MetaCompositorType type,
+ MetaDisplay *display);
-void meta_compositor_add_window (MetaCompositor *compositor,
- MetaWindow *window);
+void meta_compositor_add_window (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_remove_window (MetaCompositor *compositor,
- MetaWindow *window);
+void meta_compositor_remove_window (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_show_window (MetaCompositor *compositor,
- MetaWindow *window,
- MetaEffectType effect);
+void meta_compositor_show_window (MetaCompositor *compositor,
+ MetaWindow *window,
+ MetaEffectType effect);
-void meta_compositor_hide_window (MetaCompositor *compositor,
- MetaWindow *window,
- MetaEffectType effect);
+void meta_compositor_hide_window (MetaCompositor *compositor,
+ MetaWindow *window,
+ MetaEffectType effect);
-void meta_compositor_set_updates_frozen (MetaCompositor *compositor,
- MetaWindow *window,
- gboolean updates_frozen);
+void meta_compositor_window_opacity_changed (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_process_event (MetaCompositor *compositor,
- XEvent *event,
- MetaWindow *window);
+void meta_compositor_set_updates_frozen (MetaCompositor *compositor,
+ MetaWindow *window,
+ gboolean updates_frozen);
-cairo_surface_t *meta_compositor_get_window_surface (MetaCompositor *compositor,
- MetaWindow *window);
+void meta_compositor_process_event (MetaCompositor *compositor,
+ XEvent *event,
+ MetaWindow *window);
-void meta_compositor_set_active_window (MetaCompositor *compositor,
- MetaWindow *window);
+cairo_surface_t *meta_compositor_get_window_surface (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_maximize_window (MetaCompositor *compositor,
- MetaWindow *window);
+void meta_compositor_set_active_window (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_unmaximize_window (MetaCompositor *compositor,
- MetaWindow *window);
+void meta_compositor_maximize_window (MetaCompositor *compositor,
+ MetaWindow *window);
-void meta_compositor_sync_stack (MetaCompositor *compositor,
- GList *stack);
+void meta_compositor_unmaximize_window (MetaCompositor *compositor,
+ MetaWindow *window);
-gboolean meta_compositor_is_our_xwindow (MetaCompositor *compositor,
- Window xwindow);
+void meta_compositor_sync_stack (MetaCompositor *compositor,
+ GList *stack);
+
+gboolean meta_compositor_is_our_xwindow (MetaCompositor *compositor,
+ Window xwindow);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]