Re: [gtk-list] How to communicate with the window manager?



On Tue, 09 Nov 1999 12:29:07 +0100, Nils Rennebarth wrote:
> I want my application to execute another program and while the other program
> runs it should iconize itself and pop up again when the other program
> finishes.
> 
> How do I do this, given a decent windowanager. Is there a standard way?

Use the standard fork()/exec() code: I posted some example code to this
list two months ago, check out the mailinglist archives and look for the
subject "RFC: ". Iconize/restore is done with XIconifyWindow() and
XMapWindow(). Both functions need a display and a screen variable, which
can be get with:

  #include <gdk/gdkx.h>

  display = GDK_DISPLAY();
  screen = DefaultScreenOfDisplay(display);

Oh, almost forgot: XIconifyWindow() and XMapWindow() are only *requests*
to the window manager. There is no guarantee that the window manager will
respond, although most sane window managers will.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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