Code Monkey home page Code Monkey logo

Comments (11)

jigish avatar jigish commented on July 16, 2024

Hey man! sorry it took so long to comment on this. Do you mean screenSizeYTotal or something that is not just the visible area but the area behind the menu bar as well? And what problems do you have stacking windows? That should work just fine...

from slate.

pstadler avatar pstadler commented on July 16, 2024

The problem is, that Y doesn't take the menubar into account. For example if Y=30 the window is placed 8px below the menubar.

I'm using alias menubarHeight 22 to work around this issue.

from slate.

jigish avatar jigish commented on July 16, 2024

Interesting. Can you send me a description of how your monitors are placed, where your dock is, which monitor your menu bar is on, etc? I've seen this issue before, but thought I fixed it. Maybe it is a configuration I haven't thought of or seen before. Also, OS version and Slate version would be nice as well.

Thanks!

from slate.

jigish avatar jigish commented on July 16, 2024

@eipark or @pstadler is this still an issue? If so OS version, Slate version and .slate file would be greatly appreciated.

from slate.

paddykontschak avatar paddykontschak commented on July 16, 2024

I can confirm that this is still an issue. I had to add a special alias for the menubar just like @pstadler did.

Slate 1.0.5
Mac OS X 10.8.2
.slate

from slate.

pstadler avatar pstadler commented on July 16, 2024

My .slate for reference.

from slate.

jigish avatar jigish commented on July 16, 2024

One thing I've noticed is that neither of you are using screenOriginX and screenOriginY. Those will be the proper origin under the menu bar which you can then add to. Maybe that will help?

from slate.

pstadler avatar pstadler commented on July 16, 2024

Ok, I was able to get rid of my custom variable by using screenOriginY (commit diff).

However, it doesn't really solve the problem as the coordinates for placing windows should start from 0/screenOriginY and not from 0/0.

Example: move 10;10 ... should internally be translated to 10;32

Thanks again for this awesome tool! :-)

from slate.

jigish avatar jigish commented on July 16, 2024

The issue is when you have multiple monitors, 0,0 refers to the main monitor's 0,0. In order to get to the second monitor you need screenOriginX and screenOriginY which is why it should be there for most move operations. I explicitly do not want to auto-append screenOriginY to coordinates because it doesn't always make sense. screenOriginX and screenOriginY are meant to be the "this is the screen's origin" coordinates.

from slate.

jigish avatar jigish commented on July 16, 2024

What problem are you trying to solve exactly? I feel like there should be a way to do so with the current implementation.

from slate.

pstadler avatar pstadler commented on July 16, 2024

To place a window you say what distance it should have from the top-left pixel. Right now this top-left pixel is above the menubar, and not below it (as it should be, because you can't place windows on the menubar).

That's why I have to calculate the position of the windows by adding 22px (= menubar height) to the Y-coordinate manually.
screenOriginY seems to know about the menubar, its value is 22px.

It doesn't matter much to me, you can close this if you want.

from slate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.