After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586311 - Support changing the colormap of a realized GtkWindow
Support changing the colormap of a realized GtkWindow
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-18 20:48 UTC by Owen Taylor
Modified: 2018-02-10 03:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2009-06-18 20:48:43 UTC
Currently, gtk_widget_set_colormap() has a g_return_if_fail() if the widget is already realized.

But sometimes you want to change the colormap of a realized toplevel. In particular, if you have alpha-window effects (like a transparent terminal),
you don't want to use a argb window unless there is a compositor, since that will use excess video memory. [using an argb window forces it to be redirected, compositor or no]. But you do want to handle a compositor being started on the fly.

Getting this right in your application is *very* hard. You need to transfer:

 - your current size
 - your current position
 - your current desktop (GDK makes this close to impossible because it clears _NET_WM_DESKTOP on map)

From the old window before unrealize(), to the new window after realize(). (The state - maximized, sticky, etc, also needs to be transferred, but that is done already in GtkWindow.)

A set of patches that I'll attach to the gnome-terminal bug 564648 in a moment gives the general flavor of doing so. We should make gtk_widget_set_colormap() just do the right thing.
Comment 1 Matthias Clasen 2018-02-10 03:27:38 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.