Some windows appear on the wrong head

Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.) Ideas? Kai

Le Wed, 1 Aug 2007 08:47:20 +0200, Kai Grossjohann
Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
I don't know for Eclipse, but Inkscape (e.g.) stores the latest head used (in fact, it even saves it in project files) by default, and you can switch this off in the option menu. Maybe is it the same for Eclipse ? Regards, -- Gabriel

gabriel.kerneis:
Le Wed, 1 Aug 2007 08:47:20 +0200, Kai Grossjohann
a écrit : Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
I don't know for Eclipse, but Inkscape (e.g.) stores the latest head used (in fact, it even saves it in project files) by default, and you can switch this off in the option menu. Maybe is it the same for Eclipse ?
Huh, yes, someone else mentioned silly behaviour like this. Thanks for the info. -- Don

On 8/1/07, Donald Bruce Stewart
gabriel.kerneis:
Le Wed, 1 Aug 2007 08:47:20 +0200, Kai Grossjohann
a écrit : Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
I don't know for Eclipse, but Inkscape (e.g.) stores the latest head used (in fact, it even saves it in project files) by default, and you can switch this off in the option menu. Maybe is it the same for Eclipse ?
Huh, yes, someone else mentioned silly behaviour like this. Thanks for the info.
-- Don
I dunno if it's that silly - it just stores the window geometry, not the head specifically. This way if you load up a set of related documents, the windows will be in the same place they were. At least, within normal window managers. I know some of the main inkscape devs quite well, so if you think this should be addressed in some way.. Anyway, there's an option to switch it off. That should be enough. -mgsloan

On Wed, Aug 01, 2007 at 10:02:37AM +0200, Gabriel Kerneis wrote:
Le Wed, 1 Aug 2007 08:47:20 +0200, Kai Grossjohann
a écrit : Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
I don't know for Eclipse, but Inkscape (e.g.) stores the latest head used (in fact, it even saves it in project files) by default, and you can switch this off in the option menu. Maybe is it the same for Eclipse ?
I don't think that is the case here, as only the workspace chooser (and also some other popups such as the one that allows me to enter a class name to edit) appear on the "wrong" head. The main window appears on the currently focused head. That is, if I choose a workspace in the workspace chooser, then switch to another head, then the main window appears on the head I switched to. Kai

On Wednesday 01 August 2007 01:47:20 Kai Grossjohann wrote:
Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
Ideas?
Kai
We blindly accept the geometry requested by floating windows, which is usually the right thing to do. This case, however, is a bit troublesome. What do other window managers do in this situation? Cheers, Spencer Janssen

On Thu, Aug 02, 2007 at 09:38:43AM -0500, Spencer Janssen wrote:
On Wednesday 01 August 2007 01:47:20 Kai Grossjohann wrote:
Say my focus is on the second head. I start Eclipse. It shows a splash window on the current head (the second one). Then it pops up a workspace chooser window, but that window appears on the first head! (Even though focus is still on the second head, on the Eclipse splash window, in fact.)
Ideas?
Kai
We blindly accept the geometry requested by floating windows, which is usually the right thing to do. This case, however, is a bit troublesome. What do other window managers do in this situation?
I believe that ctwm puts transient windows in the same workspace as their "parents" (not sure what is the correct term in X11-speak). Or at least it can be configured to do so. Same for Sawfish, I think. I guess this means to interpret the geometry relative to the workspace of the parent. Kai

Spencer Janssen
We blindly accept the geometry requested by floating windows, which is usually the right thing to do. This case, however, is a bit troublesome. What do other window managers do in this situation?
I had a quick look but I don't see anything in ICCCM. I did a quick test with metacity (running in xnest). For this situation (where xmonad shows the transient at the top left hand of the screen) metacity shows it over the main window. My interpretation is that the application's specifying the position as (0,0) and metacity regards that as "don't care". The size looks OK, though, and the same in metacity as in xmonad, so I guess that *is* being set. That all seems quite plausible for a transient, so I'd guess if xmonad did that it would be acceptable. (Quite likely it is specified in ICCCM somewhere and I just didn't spot it.) (The application I used was synaptic, and I selected a depended-on package for removal. In that case synaptic pops up a dialog warning about the consequent removal of other packages.)

On Thu, Aug 02, 2007 at 04:39:13PM +0100, Bruce Stephens wrote:
Spencer Janssen
writes: [...]
We blindly accept the geometry requested by floating windows, which is usually the right thing to do. This case, however, is a bit troublesome. What do other window managers do in this situation?
I had a quick look but I don't see anything in ICCCM. I did a quick test with metacity (running in xnest). For this situation (where xmonad shows the transient at the top left hand of the screen) metacity shows it over the main window.
"My" popup wasn't displayed at 0,0; it was displayed near the center (but a little bit east and south of it) of the primary head. FWIW, if I move the popup to the right workspace (and thus head) once manually, then subsequent popups show up on the right head. (Or do they show up in the right workspace? I didn't try to switch workspaces between invoking the popup and the window appearing.) Kai

Kai Grossjohann
"My" popup wasn't displayed at 0,0; it was displayed near the center (but a little bit east and south of it) of the primary head.
FWIW, if I move the popup to the right workspace (and thus head) once manually, then subsequent popups show up on the right head. (Or do they show up in the right workspace? I didn't try to switch workspaces between invoking the popup and the window appearing.)
I'd guess that the program's remembering the position, which would make lots of sense. So that's two cases: the program doesn't care, and says (0,0) the program thinks it knows, and says (1487,283) (say) In the second case I guess it wouldn't be unreasonable for a window manager to calculate the relative position on the screen and move it appropriately. Feels risky but I guess I'm thinking of things like panels and gkrellm and things, but they're not transient windows (they're just treated much the same as floating windows). That leaves a possible class of programs that specify an absolute position and really mean it. I can't think of any plausible examples, but I'd guess it's conceivable. I've got one application that tries to open a transient in the center of the screen but doesn't know about Xinerama (so that fails on my 2-screen setup). So maybe the second case above (where the application specifies a position) could look to see if the requested window would be overlapping two screens, and if so could move it?

On Aug 2, 2007, at 11:39 , Bruce Stephens wrote:
My interpretation is that the application's specifying the position as (0,0) and metacity regards that as "don't care". The size looks OK, though, and the same in metacity as in xmonad, so I guess that *is* being set.
That all seems quite plausible for a transient, so I'd guess if xmonad did that it would be acceptable. (Quite likely it is specified in ICCCM somewhere and I just didn't spot it.)
Actually, I think that's an old bug workaround that has turned into a feature. Some ancient applications used (0,0) to mean "don't care" (holdover from X10?), and window managers often (not always) honor it as such for backward compatibility; I guess it's back in vogue. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
participants (7)
-
Brandon S. Allbery KF8NH
-
Bruce Stephens
-
dons@cse.unsw.edu.au
-
Gabriel Kerneis
-
Kai Grossjohann
-
mgsloan
-
Spencer Janssen