Re: minimize window
- From: Havoc Pennington <hp redhat com>
- To: toshi optimum co jp
- Cc: gtk-app-devel-list gnome org
- Subject: Re: minimize window
- Date: 25 Apr 2001 14:15:27 -0400
Toshimi Yamaguchi <toshi2 optimum co jp> writes:
please could someone give advices...
I am developped the program on GNOME.
A program assigns a button to an nornmal window.
I want to assign the same operation as the time of clicking
the minimize button on a window to this button.
The event at the time of clicking a minimize button is
investigated, and although he plans to make it reappear,
it does not work.
If a minimize button (is it the thing as which this name is
sufficient?) is clicked, it remains in the panel.
It will be re-displayed if the button on a panel is clicked.
I want to do this.
Although the tried event is hide/unmap/unrealize,
it will all disappear from a panel.
Therefore, it cannot re-display.
Aren't there any good methods?
The GDK 2 function is:
void
gdk_window_iconify (GdkWindow *window)
{
Display *display;
GdkWindowObject *private;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
display = GDK_WINDOW_XDISPLAY (window);
private = (GdkWindowObject*) window;
if (GDK_WINDOW_IS_MAPPED (window))
{
XIconifyWindow (display, GDK_WINDOW_XWINDOW (window), DefaultScreen (display));
}
else
{
/* Flip our client side flag, the real work happens on map. */
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
}
This won't work exactly with 1.2, you want something like:
void
gdk_window_iconify (GdkWindow *window)
{
Display *display;
g_return_if_fail (window != NULL);
if (GDK_WINDOW_DESTROYED (window))
return;
display = GDK_WINDOW_XDISPLAY (window);
XIconifyWindow (display, GDK_WINDOW_XWINDOW (window), DefaultScreen (display));
}
You'll have to include gdk/gdkx.h
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]