sahwar / 7plus

Automatically exported from code.google.com/p/7plus
1 stars 0 forks source link

occasionally a click moves window to center on primary monitor #369

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This only happens when 7plus is running, but I have not figured out exactly 
what triggers it. Sometimes when I click on a window it gets moved to the 
center of my primary monitor. I have all events, including advanced events, 
turned off except for ALT + Space for Accessor, but it still keeps happening 
making me thing there is a event that is now being shown in the events list. 
Thx.

7plus 2.5.0
Windows XP SP3 with 3 monitors (using MaxiVista)

Original issue reported on code.google.com by d...@ubiqsoft.com on 10 Mar 2012 at 4:55

GoogleCodeExporter commented 8 years ago
There's one place in code that might possibly cause it. It's related to 
SlideWindows and makes sure that a window that is activated while it is outside 
of the screen(s) (and isn't a slide window) gets moved in (to the center of the 
first screen actually). Can you check if it depends on positioning the window? 
If it's close to a screen border or overlaps with one?

Original comment by fragman@gmail.com on 10 Mar 2012 at 8:56

GoogleCodeExporter commented 8 years ago
That sure sounds like it.

My windows are always on a screen border, I use WindowPad 
(file:///C:/apps/windowpad/WindowPad.html). But it doesn't always 
happen, I don't know what situation triggers it. If you point me to the 
line I can comment it out for now and see if it stops happening....

Also note I do have all the window events disabled.

Thanks!
d

Original comment by d...@ubiqsoft.com on 10 Mar 2012 at 9:09

GoogleCodeExporter commented 8 years ago
SlideWindows.ahk, 586:
WinMove, ahk_id %hwnd%,, % A_ScreenWidth / 2 - w / 2, % A_ScreenHeight / 2 - h 
/ 2

Original comment by fragman@gmail.com on 10 Mar 2012 at 9:28

GoogleCodeExporter commented 8 years ago
I can confirm that is the problem. I put a MsgBox there and it popped 
up. I've commented it out for now. Shouldn't it be captured in the 
events list somewhere (so it can be turned off)?

I'll add right now the code is using the from monitor sizes rather than 
the to monitor sizes for sizing. So if the window is warped to a 
smaller primary monitor it is clipped.

d

Original comment by d...@ubiqsoft.com on 11 Mar 2012 at 5:36

GoogleCodeExporter commented 8 years ago
I improved this code to check each monitor separately, so it shouldn't happen 
anymore in the future.

Original comment by fragman@gmail.com on 6 Jun 2012 at 7:25