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

Grey Space when Resizing with Spectacle #3091

Open
jpryda opened this issue Jun 20, 2018 · 10 comments · Fixed by RedAnt79/sequelpro#1 · May be fixed by #3291
Open

Grey Space when Resizing with Spectacle #3091

jpryda opened this issue Jun 20, 2018 · 10 comments · Fixed by RedAnt79/sequelpro#1 · May be fixed by #3291
Labels

Comments

@jpryda
Copy link

jpryda commented Jun 20, 2018

OS X Version: 10.13.4
Sequel Pro Version: Build 3477d22387 (self-compiled in Xcode)
MySQL server: 5.6.33

When resizing a window using Spectacle shortcuts, unreclaimable grey space is produced which squashes the UI. (This doesn't happen in the old stable version).

screenshot 2018-06-20 10 50 51

@dmoagx
Copy link
Member

dmoagx commented Jun 20, 2018

When stepping through with the debugger the window is actually resized correctly and then the tab bar triggers another resize with invalid sizing.

That happens because the code flow is the following:

  • -[PSMTabBarControl frameDidChange:] is one of the first methods to be called,
  • which starts the animation timer (for -animateShowHide:),
    • but at this point the main content area has not actually been resized yet
      • (since the content view and the tab bar are children of the same view their frames will be updated in order and the tab bar is the first child).
  • The main view and all children are resized to the correct size
  • -windowDidResize: is called
  • The run loop starts the next iteration
    • The animation timer is actually triggered and updates the main content area to the (now invalid) frame which it had when the animation was created

(There is yet another bug here, probably introduced in 92ee758, where one complete animation of the tab bar will trigger another animation round that immediately gets cancelled by the old animation round trying to invalidate its own timer but actually invalidating the new one instead)

@dmoagx dmoagx added the Bug label Jun 20, 2018
@Muffinman
Copy link

I also get this when resizing with moom.

@domluther
Copy link

Yup, bettertouchtool and the same issue here. If I increase the size normally, there's no problem.

If I use my "Maximise Window" shortcut and the window is not touching the top, it maximises, looks OK briefly and then goes wrong.
If the window is touching the top, it looks wrong immediately.

@zachschultz
Copy link

Have this issue as well, very frustrating to need to open a new window each time this issue happens

@tweekmonster
Copy link

tweekmonster commented Nov 11, 2018

This also happens when disconnecting and reconnecting a monitor from my laptop. So, it's not limited to third party software changing the window size.

@tweekmonster
Copy link

@dmoagx This resolves the issue:

diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 3e3c1e30..676a061e 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -1811,2 +1811,4 @@
                [self setNeedsDisplay:YES];
+       } else {
+               [self update:NO];
        }

This is the first time I looked through the code, so I'm sure there'll be side effects. Hopefully this helps someone more familiar to narrow down the actual cause.

@dmoagx
Copy link
Member

dmoagx commented Nov 11, 2018

@dhcmega
Copy link

dhcmega commented Jun 20, 2019

Hi, I'm still getting this error when resizing with spectacle. I'm using Build 5446 (97c1b85). Should I use a different binary?

@bladepop
Copy link

Any updates?

@stale
Copy link

stale bot commented Jul 2, 2020

This project is not maintained anymore and was replaced. Please see #3705.

@stale stale bot added the stale label Jul 2, 2020
@abhibeckert abhibeckert removed the stale label Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
9 participants