| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| My real question is: Is there a shell tool way to change the attributes displayed by xwininfo? Background: I have a program that figures out the window ID for a window, then invokes the xRaiseWindow() function on it. However, I have found that it doesn't work - the window is not raised (but no error is generated as far as I can tell). This program has worked fine in the past - on other versions of Linux and on Solaris - so I don't think there is a code problem. But "man xRaiseWindow" says that if the override_redirect is "no" (and some other condition that escapes me at the moment), then the window will not be raised. I see in xwininfo that override_redirect is "no" and I'd like to change that. |
|
#2
|
| On Oct 6, 1:05*pm, gaze...@shell.xmission.com (Kenny McCormack) wrote: > My real question is: Is there a shell tool way to change the attributes > displayed by xwininfo? > > Background: I have a program that figures out the window ID for a > window, then invokes the xRaiseWindow() function on it. *However, I have > found that it doesn't work - the window is not raised (but no error is > generated as far as I can tell). *This program has worked fine in the > past - on other versions of Linux and on Solaris - so I don't think > there is a code problem. > > But "man xRaiseWindow" says that if the override_redirect is "no" (and > some other condition that escapes me at the moment), then the window > will not be raised. Not quite. If override_redirect is False AND the window manager has selected SubstructureRedirectmask on the parent window, then the raisw window request is sent to the window manager instead of acting immediately. The window manager may either raise the window or refuse to do so, >*I see in xwininfo that override_redirect is "no" > and I'd like to change that. Use XChangeWindowAttributes() to change the overrided_redirect attribute. Also, are you SURE you are getting the correct window ID? Which one do you want - the window you created, or the window that the window manager wraps it in? -- Fred Kleinschmidt |
|
#3
|
| [Docter, it hurts when I do *this*] Kenny McCormack wrote: > Background: I have a program that figures out the window ID for a > window, then invokes the xRaiseWindow() function on it. However, I have > found that it doesn't work - the window is not raised (but no error is > generated as far as I can tell). This program has worked fine in the > past - on other versions of Linux and on Solaris - so I don't think > there is a code problem. It depends on the policies set by the window manager. Take KWin for example. Using the default settings, it simply marks the window as REQUESTING ATTENTION. The task manager will flash it's button a few times, then hilight it. It can play a audio clip or show a pop-up window to draw even more attention. You can also change it's behavior so that the window will be raised immediately. > But "man xRaiseWindow" says that if the override_redirect is "no" (and > some other condition that escapes me at the moment), then the window > will not be raised. I see in xwininfo that override_redirect is "no" > and I'd like to change that. It won't help you! After a window is created, but before it appears on the screen the Application Window is just another child of the Root Window: Root Window Application Window But after it has been mapped (made visible) it will have been adopted by the window manager. The window hierarchy will /typically/ look like this: Root Window Frame Window Decoration Window Decoration Objects... Client Window Application Window So, even if you set the override_redirect on the Application Window, XRaiseWindow can only raise it within the Client Window. (The -frame option to xwininfo will get you the Frame Window, but messing with the window manager's windows seems like a whole new kind of stupid to me.) -- Huibert "Hey! HEY! Curious cat, here!" -- Krosp I (GG) |
|
#4
|
| In article <939aa2e6-9f63-4446-aae7-964fc77a87db@w1g2000prk.googlegroups.com>, Fred >On Oct 6, 1:05*pm, gaze...@shell.xmission.com (Kenny McCormack) wrote: >> My real question is: Is there a shell tool way to change the attributes >> displayed by xwininfo? >> >> Background: I have a program that figures out the window ID for a >> window, then invokes the xRaiseWindow() function on it. *However, I have >> found that it doesn't work - the window is not raised (but no error is >> generated as far as I can tell). *This program has worked fine in the >> past - on other versions of Linux and on Solaris - so I don't think >> there is a code problem. >> >> But "man xRaiseWindow" says that if the override_redirect is "no" (and >> some other condition that escapes me at the moment), then the window >> will not be raised. > >Not quite. If override_redirect is False AND the window manager has >selected SubstructureRedirectmask on the parent window, then the >raisw window request is sent to the window manager instead of >acting immediately. The window manager may either raise the window >or refuse to do so, Yes. Hence the phrase above "(and some other condition that escapes me at the moment)". >>*I see in xwininfo that override_redirect is "no" >> and I'd like to change that. > >Use XChangeWindowAttributes() to change the overrided_redirect >attribute. Of course. I was looking-for/asking-about a "shell tool" that would do that (like xprop). >Also, are you SURE you are getting the correct window ID? Which one >do you want - the window you created, or the window that the window >manager wraps it in? I probably don't understand enough of the underlying plumbing to answer that question intelligently. However, I know that this program (exact same source code - compiled with exactly the same 'gcc' command line) works fine on two other platforms (version of OS, X, window manager, etc, etc), but fails here. Not sure why. Thought maybe it had to do with the stuff alluded to above. |