AlexandreCassagne / blacktree-visor

Automatically exported from code.google.com/p/blacktree-visor
0 stars 0 forks source link

With multiple monitors, Visor opens on the last-used Terminal window's monitor, not the monitor with the OS X menu bar. #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With multiple monitors, Visor opens on the last-used Terminal window's monitor, 
not the monitor 
with the OS X menu bar. When it opens on that monitor, there is a menu-bar 
sized gap at the top 
of the screen.

I'm using Visor 1.5a1 on OS X 10.5.1.

- Cowboy

Original issue reported on code.google.com by rj3.cow...@gmail.com on 3 Jan 2008 at 7:23

GoogleCodeExporter commented 9 years ago
It be cool to have an option to put a visor on every monitor? Different spawns 
of
course... Lame if it was the same terminal just mirrored.... Maybe an option for
each, for each his own I guess...

Original comment by morbidly...@gmail.com on 12 Apr 2008 at 4:25

GoogleCodeExporter commented 9 years ago
to make Visor open the monitor with the menu bar it's quite trivial:
in method 'showWindow' in  VisorController.m the line 181

NSScreen *screen=[NSScreen mainScreen];

should be 

NSScreen *screen=[[NSScreen screens] objectAtIndex:0];

See 
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/
NSScreen_Class/Refere
nce/Reference.html#//apple_ref/doc/uid/20000333-mainScreen

Original comment by matteo.c...@gmail.com on 27 May 2008 at 2:47

GoogleCodeExporter commented 9 years ago
I edited the source so that Visor retains the behavior of opening on whatever 
screen the last Terminal was on, 
but that it opens at the top of the window respecting the menu bar if it's 
there.  

Index: VisorController.m
===================================================================
--- VisorController.m   (revision 4)
+++ VisorController.m   (working copy)
@@ -180,7 +180,8 @@

    NSScreen *screen=[NSScreen mainScreen];
    NSRect screenRect=[screen frame];
-   screenRect.size.height-=21; // Ignore menu area
+    if (screen == [[NSScreen screens] objectAtIndex: 0])
+        screenRect.size.height-=21; // Ignore menu area

    NSWindow *window=[[self controller] window];
    NSRect showFrame=screenRect; // Shown Frame

Original comment by shiz...@gmail.com on 22 Dec 2008 at 5:22

GoogleCodeExporter commented 9 years ago
Fixed in Visor 1.7

Original comment by antonin....@gmail.com on 7 Mar 2009 at 3:55