Thankyou for the reply ..
I am looking for how a Window Manager would Maximize or manimize a Window....
I am looking for how a Window Manager would Maximize or manimize a Window....
i am able to maximixe a window with this function
void maxmizeWindow(Window winId)
{
XEvent xev;
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] = (unsigned long)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
void mixmizeWindow(Window winId)
{
XEvent xev;
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] = (unsigned long)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);
}
From: Marc Aurele La France <tsi@xxxxxxxxxxx>
To: praveen <praveenin_ece@xxxxxxxxx>
Cc: "xfree86@xxxxxxxxxxx" <xfree86@xxxxxxxxxxx>
Sent: Thursday, 20 October 2011 8:13 PM
Subject: Re: 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: tsi@xxxxxxxxxxx |
| 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.
To: praveen <praveenin_ece@xxxxxxxxx>
Cc: "xfree86@xxxxxxxxxxx" <xfree86@xxxxxxxxxxx>
Sent: Thursday, 20 October 2011 8:13 PM
Subject: Re: 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: tsi@xxxxxxxxxxx |
| 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.