Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows Aero Snap control for screen corners #7

Open
goxr3plus opened this issue Oct 1, 2018 · 12 comments
Open

Support Windows Aero Snap control for screen corners #7

goxr3plus opened this issue Oct 1, 2018 · 12 comments

Comments

@goxr3plus
Copy link
Owner

Till now i have implemented Aero Snap for top bottom right and left side.

But if you drag a window in windows on the corners of the screen you can see that it resizes to 1/4 of the screen to the corner you have dragged it ... for example .

2018-10-01_15-54-37

@goxr3plus
Copy link
Owner Author

@Typhon0 and @bwcsemaj Guys let's do it :) ?

@bwcsemaj
Copy link
Contributor

bwcsemaj commented Oct 6, 2018

If I get time later today I will look into it. Just by just checking now and throwing some System.out.print statements I can see that determining bottom left and bottom right areas of the screen are wrong.

Also, the positioning of the transparent screen is wrong top right, bottom right, and bottom left with multiple monitors.

The calculations don't take into effect if the task bar for some calculations.

I do think this isn't that big of deal to fix. Just tweaks to if statements and setting of the transparent positions (including where the task bar is; which I believe that's the whole point of the visual screen (tells actually amount of space on screen)).

I think if you substracted the maxX maxY values with the actually width and height of the screen. Then using these new values determining if top left, top right, bottom right, bottom left. From there you can then figure out the correct positioning of the transparent screen and width/height of it (code is already there just needs tweaking).

EDIT: Regarding the subtracting bit, its a bit more complicated than I thought. I forgot the values could be negative for one the screens could be different sizes (some screens might have smaller height than the primary) and also the x positioning the values to the left go negative. Anyways I'll see if I can look at it later.

@bwcsemaj
Copy link
Contributor

bwcsemaj commented Oct 6, 2018

Right would be more than half of x. Left would be less than half of x. Top would be less than half of y. Bottom would be greater than half of y. I believe. This is assuming the top left most point is 0,0 (which I can't recall at this time). So the idea is to determine before hand what the 0,0 position is for that screen. Then comparing what corner it applies to. Final setting the position/width/height of the transparent window.

EDIT: I feel dumb but during my solution I realized the 0,0 will always be screen.getMinX() and screen.getMinY()

@goxr3plus
Copy link
Owner Author

Hmmm very detailed i like. I can fix it but for multiple monitors there in no second screen :( I have only one.

@bwcsemaj
Copy link
Contributor

bwcsemaj commented Oct 7, 2018

Yeah if I didn't have multiple there would be no way of me knowing of this problem. I will try look at it now. Though the UFC fight is right now so I don't know how much I will get done.

EDIT: I ended up half watching it and found a solution. I left a pull request.

@goxr3plus goxr3plus added bug and removed wontfix labels Oct 9, 2018
@goxr3plus
Copy link
Owner Author

@bwcsemaj How are you my friend :) ?

@bwcsemaj
Copy link
Contributor

@goxr3plus I'm good. What's up?

@goxr3plus
Copy link
Owner Author

@bwcsemaj Great just wanted to hear from you :)? Will we implement this feature or should i close the issue :)?

@bwcsemaj
Copy link
Contributor

@goxr3plus I have already made a pull request months ago with the feature implemented. I have moved on from your project. I have essentially created my own Borderless Scene without the FXML stuff. I needed to do things for my project specifically and I also wanted to remove another dependency.

Also, I noticed my issue I created minimize/maximize I have closed that now.

@goxr3plus
Copy link
Owner Author

@bwcsemaj Ouh i saw today again. One advice ... in a pull request you should not format the whole file because i can't understand which parts changed in the file :)

I am trying to understand it .

@goxr3plus
Copy link
Owner Author

goxr3plus commented Jun 19, 2019

@bwcsemaj Do you have time , so we work it together ? I will release a new version for Java 11 and above.

I know you solved it but i don't completely understand your code . After all i will try again . ... ah so many repositories to support :)

@bwcsemaj
Copy link
Contributor

@goxr3plus, sorry for late response, I have had no internet and still having issues. Was able to log on and check email some where else. I will help when I get the chance, been very busy and I know the code I left worked but wasn't organized well/ well thought out. I don't know when but I'll definitely give it good read/look/attempt. Again sorry for late response.

@goxr3plus goxr3plus added this to the Next Version milestone Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants