Re: [gtk-list] Re: Un-minimizing a window?
- From: John Sullivan <sullivan eazel com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Un-minimizing a window?
- Date: Mon, 06 Dec 1999 17:22:46 -0800
Thanks Anders, this is exactly what I needed, and more. I found that I didn't
need to call flush() after the raise() and show() to get it to work correctly.
Please tell me if you know of a reason why this is fragile.
John
Anders Melchiorsen wrote:
> Erik Mouw <J.A.K.Mouw@its.tudelft.nl> wrote:
>
> > > Is there API lurking somewhere for un-minimizing a window? Or even to
> > > test whether a window is minimized?
> >
> > Try XMapWindow() or XMapRaised(). gdk/gdkx.h has some macros to get the
> > parameters that these functions want.
>
> I have these few functions in a program of mine, where the window
> variable is a GtkWindow pointer. They seem to be working.
>
> bool GladeWindow::IsIconified() const
> {
> XWindowAttributes status;
> XGetWindowAttributes(GDK_WINDOW_XDISPLAY(GTK_WIDGET(window)->window),
> GDK_WINDOW_XWINDOW(GTK_WIDGET(window)->window),
> &status);
> return (status.map_state == IsUnmapped);
> }
>
> void GladeWindow::Iconify() const
> {
> #ifdef USEXWINDOW
> XIconifyWindow(GDK_WINDOW_XDISPLAY(GTK_WIDGET(window)->window),
> GDK_WINDOW_XWINDOW(GTK_WIDGET(window)->window),
> DefaultScreen (GDK_DISPLAY ()));
> #else
> cerr << "Auto-iconify not implemented without X Windows" << endl;
> #endif
> }
>
> void GladeWindow::Uniconify() const
> {
> // This maps the window, which also de-iconifies it according
> // to ICCCM.
> gdk_window_raise(GTK_WIDGET(window)->window);
> gdk_flush();
> gdk_window_show(GTK_WIDGET(window)->window);
> gdk_flush();
> }
>
> --
> Mvh. Anders
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]