-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Do bounds-checking on more windows #4797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't refactor the BoundsChecker enum out of the class
Remove the moveWithinScreen
function - leave that for another PR
Leave Off
as a BoundsChecker option - it's not a lot of extra logic to handle and it's useful for testing bounds checking
Don't refactor the offset
option in moveTo
out - leave that for another PR
Remove the showEvent
logic - it's not a sound cross-platform plan and if explored, it should be explored with a smaller subset of widgets that can be easily tested on multiple platforms in a separate PR
This PR Fixes #2660 as well |
Such a PR would be ugly if it needed
Where does this behave badly? It works fine on Windows and seemed to have worked on other platforms before #4740 as I can't find an issue related to this.
Right, it seems like the viewer list was supposed to be shown beneath the split header. This never happened.
I can't really replicate that. The only thing that I observe is that about 8px are on another screen or OOB (I don't think I can fix that here, though). |
Testing on Arch Linux & i3:
|
Can't reproduce any of this on Windows.
That's where it's supposed to be.
Shouldn't this behave the same as a user card? You can try and move the |
Yeah the issue on my system seems to come when we use show before moveTo How come bounds checking isn't broken on Windows for something like the account switcher popup? |
and the change in behaviour of the chatter list is fine, the |
POST MY COMMIT
|
This will call `show()` and `moveTo(...)` in different orders depending on the platform
Testing on Arch Linux & i3:
|
Testing on Arch Linux & i3:
|
Windows 10:
|
Description
This is a continuation of #4740.
BaseWindow
s can opt in to bounds-checking when they're shown (old behavior). This will prefer the monitor the cursor is on.ChannelFilterEditorDialog
now has the settings window as its parent (causing it to open there instead of the main window).The following windows are now bounds-checked:
AccountSwitchPopup
UpdateDialog
SelectChannelDialog
SettingsDialog
QuickSwitcherPopup
ReplyThreadPopup
SearchPopup
QualityPopup
ColorPickerDialog
The following windows are not bounds-checked:
FramelessEmbedWindow
AttachedWindow
(does its own positioning)NotificationPopup
(never constructed)WelcomeDialog
(never constructed)InputCompletionPopup
(it's supposed to be in the middle above the split input)Fixes #4790.
Fixes #2660.