Thankyou for the reply ..
I am looking for how a Window Manager would Maximize or manimize a Window....
 
i am able to maximixe a window with this function
 
voidmaxmizeWindow(WindowwinId)


________________________________
From: Marc Aurele La France <t...@ualberta.ca>
To: praveen <praveenin_...@yahoo.com>
Cc: "xfree86@XFree86.Org" <xfree86@xfree86.org>
Sent: Thursday, 20 October 2011 8:13 PM
Subject: Re: [XFree86] minimize/Maximize a window

On Thu, 20 Oct 2011, praveen wrote:

> i have a window id of a particular window how do i minimize/Maximize
> the window using the X11 functions.

> How do i minimize a window all in Linux using X11 Functions... ...

I don't know, but would assume it depends on the specific window manager in use.

Marc.

+----------------------------------+----------------------------------+
|  Marc Aurele La France          |  work:  1-780-492-9310          |
|  Academic Information and        |  fax:    1-780-492-1729          |
|    Communications Technologies  |  email:  t...@ualberta.ca        |
|  352 General Services Building  +----------------------------------+
|  University of Alberta          |                                  |
|  Edmonton, Alberta              |    Standard disclaimers apply    |
|  T6G 2H1                        |                                  |
|  CANADA                          |                                  |
+----------------------------------+----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.



{
XEventxev;
Display*disp=XOpenDisplay(0);
memset(&xev,0,sizeof(xev));
xev.xclient.type=ClientMessage;
xev.xclient.serial=0;
xev.xclient.send_event=True;
xev.xclient.window=winId;
xev.xclient.format=32;
xev.xclient.message_type=XInternAtom(disp,"_NET_WM_STATE",False);
xev.xclient.data.l[0]=(unsignedlong)1;
xev.xclient.data.l[2]=XInternAtom(disp,"_NET_WM_STATE_MAXIMIZED_HORZ",False);
xev.xclient.data.l[1]=XInternAtom(disp,"_NET_WM_STATE_MAXIMIZED_VERT",False);
XSendEvent(disp,DefaultRootWindow(disp),False,SubstructureRedirectMask|SubstructureNotifyMask,&xev);
    /*NET_WM Works like a Charm :D*/
XRaiseWindow(disp,winId);
XCloseDisplay(disp);
}
 
But i am not able to minimixe a window with this 
voidmixmizeWindow(WindowwinId)
{
XEventxev;
Display*disp=XOpenDisplay(0);
memset(&xev,0,sizeof(xev));
xev.xclient.type=ClientMessage;
xev.xclient.serial=0;
xev.xclient.send_event=True;
xev.xclient.window=winId;
xev.xclient.format=32;
xev.xclient.message_type=XInternAtom(disp,"_NET_WM_STATE",False);;
xev.xclient.data.l[0]=(unsignedlong)1;
xev.xclient.data.l[1]=XInternAtom(disp,"_NET_WM_ACTION_MINIMIZE",False);
XSendEvent(disp,DefaultRootWindow(disp),False,SubstructureRedirectMask|SubstructureNotifyMask,&xev);
    /**MINIMIZE Does not Minimuze But the Window get de-Highlited*****/
    /*But does not get Highlited.......*/
XLowerWindow(disp,winId);
XCloseDisplay(disp);
}

Reply via email to