[metacity] window: add meta_window_get_toplevel_xvisual
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window: add meta_window_get_toplevel_xvisual
- Date: Sun, 6 Oct 2019 16:16:53 +0000 (UTC)
commit 69f3e047d9a546a413f696468f5c99ba3e7d3017
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Oct 4 19:55:19 2019 +0300
window: add meta_window_get_toplevel_xvisual
src/core/window.c | 9 +++++++++
src/include/window.h | 1 +
2 files changed, 10 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index efe58755..b7c6bfa0 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8980,6 +8980,15 @@ meta_window_get_toplevel_xwindow (MetaWindow *window)
return window->xwindow;
}
+Visual *
+meta_window_get_toplevel_xvisual (MetaWindow *window)
+{
+ if (window->frame != NULL)
+ return meta_frame_get_xvisual (window->frame);
+
+ return window->xvisual;
+}
+
/**
* meta_window_get_transient_for:
* @window: a #MetaWindow
diff --git a/src/include/window.h b/src/include/window.h
index 217ab4ba..c4837b92 100644
--- a/src/include/window.h
+++ b/src/include/window.h
@@ -39,6 +39,7 @@ MetaScreen *meta_window_get_screen (MetaWindow *window);
MetaDisplay *meta_window_get_display (MetaWindow *window);
Window meta_window_get_xwindow (MetaWindow *window);
Window meta_window_get_toplevel_xwindow (MetaWindow *window);
+Visual *meta_window_get_toplevel_xvisual (MetaWindow *window);
MetaWindow *meta_window_get_transient_for (MetaWindow *window);
gboolean meta_window_is_fullscreen (MetaWindow *window);
gboolean meta_window_is_maximized (MetaWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]