[gtk+] gdk: Remove GdkWindow.depth member variable
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Remove GdkWindow.depth member variable
- Date: Fri, 28 Oct 2016 03:55:10 +0000 (UTC)
commit 6cc94ff1763635d68c0eb2bf7c5f52ed0142b554
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 27 16:24:42 2016 +0200
gdk: Remove GdkWindow.depth member variable
It's unused.
gdk/broadway/gdkwindow-broadway.c | 1 -
gdk/gdkinternals.h | 1 -
gdk/gdkwindow.c | 2 --
gdk/wayland/gdkwindow-wayland.c | 1 -
gdk/x11/gdkwindow-x11.c | 10 ++++++----
5 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 9044144..2dff60a 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -220,7 +220,6 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
impl->id = 0;
window->window_type = GDK_WINDOW_ROOT;
- window->depth = 24;
window->x = 0;
window->y = 0;
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 4a63967..f9951cd 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -167,7 +167,6 @@ struct _GdkWindow
GdkEventMask event_mask;
guint8 window_type;
- guint8 depth;
guint8 resize_count;
gint8 toplevel_window_type;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 2b32b71..35eb40e 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1240,11 +1240,9 @@ gdk_window_new (GdkWindow *parent,
if (attributes->wclass == GDK_INPUT_OUTPUT)
{
window->input_only = FALSE;
- window->depth = window->visual->depth;
}
else
{
- window->depth = 0;
window->input_only = TRUE;
}
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index a714b18..b33c67a 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -376,7 +376,6 @@ _gdk_wayland_screen_create_root_window (GdkScreen *screen,
cairo_surface_set_device_scale (impl->staging_cairo_surface, impl->scale, impl->scale);
window->window_type = GDK_WINDOW_ROOT;
- window->depth = 32;
window->x = 0;
window->y = 0;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 52dfd84..f6c49cd 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -641,7 +641,6 @@ _gdk_x11_screen_init_root_window (GdkScreen *screen)
impl->window_scale = x11_screen->window_scale;
window->window_type = GDK_WINDOW_ROOT;
- window->depth = DefaultDepthOfScreen (x11_screen->xscreen);
window->x = 0;
window->y = 0;
@@ -915,6 +914,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
unsigned int class;
const char *title;
+ int depth;
display_x11 = GDK_X11_DISPLAY (display);
xparent = GDK_WINDOW_XID (real_parent);
@@ -978,10 +978,14 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
impl->override_redirect = TRUE;
}
+
+ depth = visual->depth;
}
else
{
class = InputOnly;
+
+ depth = 0;
}
if (window->width * impl->window_scale > 32767 ||
@@ -1002,7 +1006,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
(window->x + window->parent->abs_x) * impl->window_scale,
(window->y + window->parent->abs_y) * impl->window_scale,
window->width * impl->window_scale, window->height * impl->window_scale,
- 0, window->depth, class, xvisual,
+ 0, depth, class, xvisual,
xattributes_mask, &xattributes);
g_object_ref (window);
@@ -1159,8 +1163,6 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
win->state = 0;
win->viewable = TRUE;
- win->depth = attrs.depth;
-
g_object_ref (win);
_gdk_x11_display_add_window (display, &GDK_WINDOW_XID (win), win);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]