ianyh / Amethyst

Automatic tiling window manager for macOS à la xmonad.
https://ianyh.com/amethyst/
MIT License
14.83k stars 487 forks source link

Fullscreen mode #254

Closed caskolkm closed 9 years ago

caskolkm commented 10 years ago

based on #235 running yosemite and amethyst 0.9.4: look at the menu bar..

screen shot 2014-10-24 at 13 30 08

Trello Card

ianyh commented 10 years ago

Still working for me fine. Is that Android Studio? I can test when I get a chance.

caskolkm commented 10 years ago

It's IntelliJ IDEA :)

caskolkm commented 10 years ago

look at this fullscreen mode..

screen shot 2014-10-24 at 14 22 38

Hultner commented 10 years ago

I get these same problems in fullscreen with all sorts of applications such as Spotify and Calendar. Also when I leave a fullscreen workspace and come back to it my window will retile so that I get a gray stripe at top where the menubar would be almost like in the first screenshot here. My solution so far have been hitting alt+t right while the the animation when going into fullscreen is still active, this usually make the application behave as expected. If there is a way for Amethyst to treat all fullscreen application as floating that might solve this problem.

ianyh commented 10 years ago

Calendar works for me. Haven't had a chance to test IntelliJ or Spotify.

What versions of Amethyst and OS X are you guys running?

Hultner commented 10 years ago

skarmavbild 2014-10-26 kl 18 09 28 Here you can see the bug in Chrome for me.

caskolkm commented 10 years ago

@ianyh 0.9.4

ianyh commented 10 years ago

Another question: do you have displays have separate spaces turned on or off?

Hultner commented 10 years ago

Turned on, the bug usually appears when switching back to a space.

caskolkm commented 10 years ago

Turned on.

ianyh commented 10 years ago

I have now been able to reproduce this. Should hopefully be able to fix it soon, but I'm swamped with other stuff.

caskolkm commented 10 years ago

any idea when this bug will be fixed?

ianyh commented 10 years ago

Probably not until after the middle of this month.

ianyh commented 10 years ago

Spent some time looking into it. This is basically the same as #207 . The problem is that there is a race condition between changing spaces and changing the activity of windows. i.e., sometimes the space will be marked as something, but the windows in both the new space and the previous space are marked as active. Looking into ways to get around the race condition.

ianyh commented 10 years ago

The secondary problem is that we don't reflow windows in fullscreen application spaces, so the window gets placed incorrectly, and then has no way of getting back. I really need to figure out a way to detect when the space starts changing as opposed to when it finishes doing so.

caskolkm commented 9 years ago

i hope there will be a fix soon. Until now i need to quit amethyst..

ianyh commented 9 years ago

Having done some more digging I've actually got a fix for this in the works. I'm hoping to get a development build out this that people can test. I tried very hard to reproduce the bug with the new behavior and failed, so I'm optimistic.

caskolkm commented 9 years ago

let me know when devbuild is ready!

ianyh commented 9 years ago

@drumstick23 dev build out, let me know if it helps

caskolkm commented 9 years ago

Installed! In a couple of days i will report if they are still issues.

caskolkm commented 9 years ago

@Hultner can you installed dev build too? and check if there are still problems.

caskolkm commented 9 years ago

After a hour of working in 0.9.5b there are still issues, the windows size is good. The menubar is black, so the bottom of the window is not visible (falls out of the screen)

ianyh commented 9 years ago

@drumstick23 so the first screenshot you posted is still happening?

Hultner commented 9 years ago

I'm running 0.9.5b and the problems seem to still be persistent. Sorry that I didn't report it earlier, I've had a hectic couple of days. skarmavbild 2014-11-21 kl 01 23 26

ianyh commented 9 years ago

Damn. Back to the drawing board.

caskolkm commented 9 years ago

@ianyh not the same, in full screen mode the window is (1680 x 1050) but because it isn't placed at the top corner the bottom of the window falls of

girvo commented 9 years ago

I've also experienced the same bug that @drumstick23 experienced. Is there anything I can do to help debug this?

leonardt commented 9 years ago

I've seen this but rarely, I'll try to find a reproducible set of steps to get it to happen (@girvo that is one way to help. A list of steps that will reproduce the bug every time will aid debugging it).

However I haven't seen the ghost space for the menubar show up yet so looks good for that.

Edit: I have a feeling it may be related to full screening an app then quickly changing spaces, so perhaps it's related to the asynchronous nature of reflows?

leonardt commented 9 years ago

Okay, it seems I'm able to reproduce this consistently by switching between fullscreen apps using mission control (4 finger swipe up on my system).

Edit: It seems that it's not entirely caused by mission control. I think it relates to switching with mission control after you fullscreen an app that was tiled in a layout with more than one window (taking on the old shape it used to have in said layout). This makes me think that this must be related to the reflow dispatching.

caskolkm commented 9 years ago

@ianyh when will you fix this?

ianyh commented 9 years ago

@leonardt @drumstick23 I still can't reproduce anymore, so I'm not sure how to move forward. What are the specs are the machines you guys are running?

TimSoethout commented 9 years ago

I think you fixed the most of it, since it happens less. But sometimes it still happens on my 2014 27' imac (non 5k) i7 32gb with one extra Dell monitor with the same resolution.

ianyh commented 9 years ago

Is there a behavioral pattern that is triggering it? Does it happen when you first go fullscreen? Does it happen when you switch in and out of the full screen app? How do you switch in and out? Mission control? Using next/previous space navigation?

girvo commented 9 years ago

I think I've worked out how to trigger it, or at least what is triggering it.

So, you have a virtual desktop with no other apps on it except, say, Safari. You set Safari to fullscreen mode. This works fine, no problems! You delete or otherwise change that virtual desktop, so Safari is now "assigned" to a virtual desktop with other apps on it. Change between those virtual desktops, and viola, your full screen safari is now taking up half the screen, as if it was on the virtual desktop with the other app, even though it's full screen.

This is not the only way it's triggered, but Amethyst believing the app to be on a virtual desktop with another app despite being full screen seems to be the base symptom. Hope that helps.

caskolkm commented 9 years ago

good job @girvo

ianyh commented 9 years ago

I actually still can't reproduce on either of my machines with external displays and without.

@drumstick23 can you reproduce with @girvo's steps?

ianyh commented 9 years ago

Deployed another dev version with some more changes that should help prevent this from happening. Let me know if anything's changed.

caskolkm commented 9 years ago

@ianyh installed new dev version, i can reproduce it with @girvo 's steps.

so my story:

2 virtual desktops: 1 with chrome and iterm, 1 with hipchat put hipchat in fullscreen mode, removed the virtual desktop where hipchat was before full screen mode a little tiggering with or without mission controle, e voile, the window thinks there are 3 screens on a fullscreen window.

caskolkm commented 9 years ago

in my opinion what goes wrong: when a window is in fullscreen mode, there can't be placed 3 window on the screen...

Hultner commented 9 years ago

I'm still experiencing problems with 0.9.5b2. Some screenshots skarmavbild 2014-12-15 kl 10 59 21 skarmavbild 2014-12-15 kl 11 00 15 skarmavbild 2014-12-15 kl 11 00 29

My setup is the following 2x1920x1080 external displays and the internal 2560x1600 rMBP display running in 1680x1050 HiDPI mode. It seems to happen when I switch back to a full screen space after I've been in a "normal" tiled space. Most of my spaces run 2 tiles, sometimes 1 or 3 tiles but they're less common.

ianyh commented 9 years ago

Okay. There is definitely something else going on than what I thought it was. I'll have to experiment more to see if I can reproduce.

Do any of you assign apps to desktops?

caskolkm commented 9 years ago

what do you mean? with Amethyst?

ianyh commented 9 years ago

screen shot 2014-12-15 at 4 37 05 pm

Like that.

Hultner commented 9 years ago

Nope, didn't know about that feature before now. Checked and all my applications appear unassigned/none.

girvo commented 9 years ago

No, I experience the bug without having to assign applications to specific desktops.

Sent from my iPhone

On 16 Dec 2014, at 3:40 am, Ian Ynda-Hummel notifications@github.com wrote:

Okay. There is definitely something else going on than what I thought it was. I'll have to experiment more to see if I can reproduce.

Do any of you assign apps to desktops?

— Reply to this email directly or view it on GitHub.

caskolkm commented 9 years ago

Lol, i also didn't know about that feature ;)

caskolkm commented 9 years ago

so there is a problem: i can't without work without amethyst, but i can't without fullscreen apps. When will we see some process on this bug?

ianyh commented 9 years ago

Unfortunately, this bug isn't linear in that spending time on it does not necessarily mean progress. I've been pretty bogged down with work and the holidays, but I'm hoping to get back to this now that things have quieted down a bit, but it's going to require a non-trivial breakthrough to figure out what's going on. I might need to prioritize #28 to get more data.

caskolkm commented 9 years ago

@ianyh if i can help you, let me know ( i am a developer but not related to objective C... )

ianyh commented 9 years ago

Okay, new theory:

Looking at the reflow calls on my machine the sequence is as follows:

However, as explained in #177 , shifting GPUs can trigger reflows. If the fullscreen transition animation triggers a GPU shift you could run into the following sequence of events:

This might explain why it happens to some people and not others, and the sequence of events would cause the observed effects. Going to see if I can figure out a way to patch things up.