[gtk+] gdkwindow: Don't enforce a native window for a custom visual
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkwindow: Don't enforce a native window for a custom visual
- Date: Wed, 8 May 2013 14:02:34 +0000 (UTC)
commit 63a35b6f9cd3a0446cf32839a730f2ce71e82d28
Author: Alexander Larsson <alexl redhat com>
Date: Wed May 8 15:57:58 2013 +0200
gdkwindow: Don't enforce a native window for a custom visual
In the ancient X days you could have Xservers that had multiple active windows, like
one truecolor and one 8bit palette. Then most apps ran in 8bpp but a single window
would use truecolor. This is done by specifying different visuals for the windows.
To make this work we ensured that a window with a visual different from its parent
gets a native subwindow, so that X can tell the hardware to do its magic.
These days the only real time we get two different visual is when one is a rgba visual
and the other is not. So, the code to check this doesn't really do anything but
get in the way when someone accidentally manages to not get a rgba visual on
a child window (see bb7054b508bfe41eb3e7f27496d4c2eb3a2b2f7a). So, to avoid
such errors we just remove the "different visual than parent" check.
gdk/gdkwindow.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index a71c0d2..f4f1440 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1361,10 +1361,6 @@ gdk_window_new (GdkWindow *parent,
native = FALSE;
if (window->parent->window_type == GDK_WINDOW_ROOT)
native = TRUE; /* Always use native windows for toplevels */
- else if (!window->input_only &&
- (attributes_mask & GDK_WA_VISUAL &&
- attributes->visual != gdk_window_get_visual (window->parent)))
- native = TRUE; /* InputOutput window with different visual than parent, needs native window */
if (gdk_window_is_offscreen (window))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]