Re: gdk_window_set_decorations --> Solved



In case anyone else is wondering:


In WindowMaker I got around the problem mentioned below with the following code:

static int i = 0;  // Or whatever state you want.

i = !i;
gtk_widget_hide(widget);
gdk_window_set_decorations(widget->window, i);   // See note below
gtk_widget_show(widget);

NOTE: Notice that a switch or some if statements could be substituted here to cycle through the desired decorations.

Good luck.


Havoc Pennington wrote:

Marco Quezada <mquezada nlxcorp com> writes:

Hmmm, I've tried that but it doesn't kick in :). If a call to
gdk_window_set_decorations (window, GDK_DECOR_ALL) is made that seems
to turn off the decorations. So then would another call with
GDK_DECOR_ALL turn them back on? I lookes at the source code in XMMS
and what I found out is that the XMMS window is actually destroyed and
then redrawn when the user toggles the WM decorations on. Are some
window managers more "compliant" with the GTK/GDK calls? I'm running
WindowMaker and except for this issue I've had no "incompatibilities".


It's possible that some window managers don't honor dynamic changes
(changes after you show the window). gdk_window_set_decorations
(window, 0) works pretty reliably, but using any other arg to
set_decorations or changing it after showing the window is kind of
window-manager-dependent.

The hints used for gdk_window_set_decorations() are the old Motif/mwm
hints, not something GTK invented, but they are pretty poorly
documented (i.e. not documented at all), so it's hard to say what
window managers "should" do. It's not in any spec.

Havoc


--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]