ryank514 / shiftit

Automatically exported from code.google.com/p/shiftit
0 stars 0 forks source link

Window resizing on multiple monitors make windows the appropriate size, but on the wrong monitor. #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have multiple monitors
2. Have the taskbar associated on the secondary monitor. I have a
macbookpro and when I plug in a monitor, I have my taskbar put on the
secondary monitor.
3. Place a window on the laptop display. Hit left or right resize of shiftit. 

What is the expected output? What do you see instead?
Supposed to create window taking 1/2 the screen on the laptop display.
Instead it makes the window 1/2 the size of the laptop display, but places
it on the secondary monitor

What version of the product are you using? 1.2

On what operating system( 10.5
or 10.6)? 10.6

Are you using a dual monitor? Yes

Attach screenshots if it is a problem with the window position and size.

Please attach logs if you notice any crashes.

Please provide any additional information below.

My screens are arranged with my laptop display below my secondary monitor
(which has the taskbar). 

I love this app! It would be awesome if you could fix this little bug. I
would really like to be able to snap windows to left/right of both displays
easily. Currently I can only snap windows to left/right/bottom/top etc on
the secondary display.

Original issue reported on code.google.com by dchaws on 8 May 2010 at 7:25

Attachments:

GoogleCodeExporter commented 8 years ago
This seems to be an issue of how the displays are arranged. The y-value is
incorrectly assigned. If I arrange the displays side by side, then it works
semi-correctly. If I arrange the displays side by side, but one a little higher 
then
the other, you can still see the problem.

Original comment by dchaws on 13 May 2010 at 1:56

GoogleCodeExporter commented 8 years ago
Ok. So I am a programmer, but Cacoa is new to me. I checked out the code and 
did a
little debugging. The problem is with the lines 

_windowPosition.y = ((_screenVisiblePosition.x ==0)? _menuBarHeight:0);

in the shift left or right functions (and all others).

First, why is it _screenVisiblePosition.x, and not .y? Anyways, when my 
displays are
arranged on top of one another, and when shiftit is called on a window in the 
bottom
display, then _screenVisiblePosition.y is -896. So this seems to reference the 
bottom
left corner of the bottom display relative to the bottom left corner of the top
display. The problem is it seems the _windowPosition.y coordinate system is 
centered
in the upper left of the top display with the positive y-axis going down. So, 
in my
case, _windowPosition.y should be 1080. The height of the display arranged on 
top.

In my case, I hard coded this value of 1080 when _screenVisiblePosition.y is 
negative.

Those of you who are Cocoa experts, and mac coordinate system experts, please 
check
this problem out. 

if ( _screenVisiblePosition.y >= 0 )
{
    _windowPosition.y = ((_screenVisiblePosition.x ==0)? _menuBarHeight:0);
}
else {
    _windowPosition.y = 1080;
}

Original comment by dchaws on 13 May 2010 at 3:57

GoogleCodeExporter commented 8 years ago
Hello dchaws,

I think I have fixed this.

> ((_screenVisiblePosition.x ==0)? _menuBarHeight:0);
this compensates for the Menubar height if _screenVisiblePosition.x == 0 
because it
is only true for the primary monitor which starts at 0,0 and holds the menu bar 
...
but still this line needed some offset improvement for multi monitor ...

Look at my patch for Issue 26 (<a
href="http://code.google.com/p/shiftit/issues/detail?id=26">link</a>
and tell me if this fixes your problem ...

Regards Marco

Original comment by masc...@gmail.com on 17 May 2010 at 10:07

GoogleCodeExporter commented 8 years ago
I have downloaded ShiftIt just today, and I'm having basically the same 
problem, so the maybe it's still not fixed.

Original comment by a.sz.sz...@gmail.com on 18 Jun 2011 at 6:36

GoogleCodeExporter commented 8 years ago
Hi,

I'm the new maintainer of ShiftIt. I don't know if you have noticed, but the 
development has moved to https://github.com/fikovnik/ShiftIt - please give it a 
try. I believe that these issues have been fixed. If you find some other, 
please submit an issue directly at github.

Filip

Original comment by krikava on 18 Jun 2011 at 6:33