How to resize a window than hasn't been created by me
Hello, I'm new in XWindows.
I want to resize a window that already exists. I've tryed to resize it
using the wmctrl command, but it doesn't works. Becouse of this I'm
trying to use the XWindows to resize the window.
I've wrote a shell script that works like this:
First, I give the focus to the window I want to resize it. Then, I
call to a c program that tries to resize that window using the
XResizeWindow funtion.
I'm using the XResizeWindow function this way:
XResizeWindow(dis,InputFocus,100,100);
The execution of my c program returns the next:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 12 (X_ConfigureWindow)
Resource id in failed request: 0x1
Serial number of failed request: 7
Current serial number in output stream: 7
This clear one that the problem is in the window parameter. I can't use
only InputFocus here. What
I must use? I've to select a window that hasn't been created by me. How
can I do that?
I hope you can help me, thanks in advance...
Jose.
Re: How to resize a window than hasn't been created by me
[email]untaljose@gmail.com[/email] wrote:[color=blue]
> Hello, I'm new in XWindows.
> I want to resize a window that already exists. I've tryed to resize it
> using the wmctrl command, but it doesn't works. Becouse of this I'm
> trying to use the XWindows to resize the window.
>
> I've wrote a shell script that works like this:
> First, I give the focus to the window I want to resize it. Then, I
> call to a c program that tries to resize that window using the
> XResizeWindow funtion.
>
> I'm using the XResizeWindow function this way:
> XResizeWindow(dis,InputFocus,100,100);
>
> The execution of my c program returns the next:
>
> X Error of failed request: BadWindow (invalid Window parameter)
> Major opcode of failed request: 12 (X_ConfigureWindow)
> Resource id in failed request: 0x1
> Serial number of failed request: 7
> Current serial number in output stream: 7
>
> This clear one that the problem is in the window parameter. I can't use
> only InputFocus here. What
> I must use? I've to select a window that hasn't been created by me. How
> can I do that?
>
> I hope you can help me, thanks in advance...[/color]
You must know the XID of the window. Run wininfo, then click the window.
It will give the Window id number.
Re: How to resize a window than hasn't been created by me
> You must know the XID of the window. Run wininfo, then click the window.[color=blue]
> It will give the Window id number.[/color]
First of all, thanks for your help.
Now, I've the XID of the window but, how must I use the XResizeWindow()
function?
I'm using it this way: XResizeWindow(display,0x03400003,width,height);
where 0x03400003 is the XID of the window.
But this doesn't work. The execution of the program doesn't generate a
BadValue event, but doesn't resize the window. Maybe I can't use the
XID in that way.
Thanks again,
Jose.
icon manager for openbox (or other modern window manager)
I'm looking for an "icon manager" functionality for the openbox (or
similar)
x11 window manager.
For those who may not be familar with this possibly archaic concept,
icon managers (as in twm)
is a set of of "boxes" that contains lists of the iconized windows.
A windowd is assigned to a specific specfic icon mamager according to
the
WM_CLASS property of the wndow, and will display the WM_ICON_NAME to
distinguish
from other icons.
For example,
WM_ICON_NAME(STRING) = "myxterm@mymachine"
WM_CLASS(STRING) = "xterm", "XTerm"
Does anyone know about such a widget for openbox?
Thanks
Re: How to resize a window than hasn't been created by me
[email]untaljose@gmail.com[/email] wrote:[color=blue][color=green]
>> You must know the XID of the window. Run wininfo, then click the window.
>> It will give the Window id number.[/color]
>
> First of all, thanks for your help.
>
> Now, I've the XID of the window but, how must I use the XResizeWindow()
> function?
> I'm using it this way: XResizeWindow(display,0x03400003,width,height);
> where 0x03400003 is the XID of the window.
>
> But this doesn't work. The execution of the program doesn't generate a
> BadValue event, but doesn't resize the window. Maybe I can't use the
> XID in that way.
>
> Thanks again,[/color]
If the parent of the window is managed by another client that is using
SubstructureRedirectMask with XSelectInput, such as a WM (window
manager), then it's conceivable that, that client is denying
size/position changes to your client that is calling XResizeWindow.
Some WM deny any non-user-selected size/position changes. It's also
possible that you need to call XFlush or XSync in your client.
-George
Re: How to resize a window than hasn't been created by me
did you ever get XResizeWindow to work? im having the same problem.
George Peter Staplin wrote:[color=blue]
> [email]untaljose@gmail.com[/email] wrote:[color=green][color=darkred]
> >> You must know the XID of the window. Run wininfo, then click the window.
> >> It will give the Window id number.[/color]
> >
> > First of all, thanks for your help.
> >
> > Now, I've the XID of the window but, how must I use the XResizeWindow()
> > function?
> > I'm using it this way: XResizeWindow(display,0x03400003,width,height);
> > where 0x03400003 is the XID of the window.
> >
> > But this doesn't work. The execution of the program doesn't generate a
> > BadValue event, but doesn't resize the window. Maybe I can't use the
> > XID in that way.
> >
> > Thanks again,[/color]
>
> If the parent of the window is managed by another client that is using
> SubstructureRedirectMask with XSelectInput, such as a WM (window
> manager), then it's conceivable that, that client is denying
> size/position changes to your client that is calling XResizeWindow.
> Some WM deny any non-user-selected size/position changes. It's also
> possible that you need to call XFlush or XSync in your client.
>
>
> -George[/color]