-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fullscreen toggle rework #11566
Fullscreen toggle rework #11566
Conversation
66144f0
to
5cd33ef
Compare
5cd33ef
to
62aa802
Compare
Note: I consider this a bugfix (though we don't know who's affected), and if others agree I can rebase onto 2.4 |
A conflict has been developed. Can we add the a "Show Menu bar" entry to the view menu as well? Firefox has it as well. A difference compared to Firefox is that the file menu opens on Alt. This is convenient on one hand, but surprising. Since I never use the file menu, we may consider to either not open a menu or store the last opened menu and open that. There is an other issue, when pressing Alt-V to open the View menu and than alt gain to hide the menu bar, the menu bar disappears and reapers shot after. Is there the visible state not stored at the beginning? |
I works the same with Qt6 |
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.
It works on Unity as well. There is an issue that Mixxx initially does pops up the auto hide warning which does not apply on such devices with a Global Menu bar. Can we skip it in this case?
There is a conflict with ALT key which is used in Unity used to open the global search. I think we can ignore this issue.
You refer to the changes of Anyway, moving comments is cumbersome, so let's discuss it here.
Sure, though when unticking the checkbox the menubar dialog shold be shown. And in this case
It should be delayed until Mixxx goes fullscreen. |
I'll take a look. |
You mean the comments are for #11526 |
3734e6c
to
0c65b7f
Compare
I rebased this onto 2.4 so it can be merged independent from #11526 |
0c65b7f
to
6c68ff4
Compare
@@ -169,6 +172,7 @@ void MixxxMainWindow::initializeQOpenGL() { | |||
#endif | |||
|
|||
void MixxxMainWindow::initialize() { | |||
qWarning() << " $ initialize"; |
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.
Debug leftover? There are more warning that should be removed or become debug messages if it adds any value to the mixxx.log.
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.
This is the last commit with debug output which should help debugging in case something doesn't work as expected.
I'll remove that in case the other commits are considered okay.
src/mixxxmainwindow.cpp
Outdated
// If we went fullscreen earlier and the desktop features a global menu | ||
// this will signal the menu to move into the window and hide itself |
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.
I don't understand that comment can you rephrase it?
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.
I could but I notice it's not required and doesn't belong here. It was required in #11526 at some point for hiding the menubar after starting in fullscreen mode.
Will remove it.
6c68ff4
to
2858858
Compare
2858858
to
32412a2
Compare
I rebased onto |
32412a2
to
cbd3eaf
Compare
Now, slotViewFullScreen() just toggles fullscreen and eventFilter() catches ALL fullscreen changes, no matter the origin. Previously, slotViewFullScreen() was also reponsible for recreating and reconnecting the menu bar and for refreshing the Fullscreen checkbox. This is okay if only Mixxx could change the fullscreen state. However, it can happen that the (Linux) window manager consumes the fullscreen hotkey, makes Mixxx go fullscreen and slotViewFullScreen() is never called.
No-op QWindowStateChangeEvent can occur if another window (preferences, About, ...) is shown above MixxxMainWindow. The event's oldState() is QWindowNoState even though the window state didn't change. Ignore these event to not recreate and reconnect the menu bar unnecessarily. That also avoids flickering, at least on Linux desktops that feature a global menu (when going fullscreen the menu is moved to the main window and hidden immediately = rapid resizing of window content)
cbd3eaf
to
5a4fe74
Compare
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.
LGTM
What is the status here? Can we just merge it to 2.5 to be part of the upcoming 2.5 beta?
Sure, this is for main/2.5. I'd even argue it's an improvement (fixing a bug in window manager(s)) and could go to 2.4, but I won't fight for that. We need testing on Windows and macOS @mixxxdj/developers
|
OK Then lets merge. Thank you. |
Cool.
|
The DEBUG messages are still in, though I'd say it's a good thing this time : ) |
Motivation
While working on #11304 I noticed that my window manager (xfwm4 on Ubuntu Studio) consumes the fullscreen hotkey F11 and
MixxxMainWindow::slotViewFullScreen()
never gets called, except when I click the menu checkbox.This happens because the fullscreen hotkey in Mixxx and in my window manager are identical.
(so most of my fullscreen testing was kinda worthless... : \ )
Changes
MixxxMainWindow::slotViewFullScreen()
does now just toggle fullscreenMixxxMainWindow::eventFilter()
catches ALL fullscreen changes (QWindowStateChangeEvent
), no matter if triggered by OS or Mixxx, and also emits a signal to recreate & connect the menu bar (only on Linux desktops that use a global menu)This works perfectly fine for me, and I'm curious how it performs on Windows and macOS. Please test!
TODO
Testing
View
>Fullscreen
as well as any of the hotkeys printed next to it should toggle fullscreen without any unusual flickering--f
or--full-screen
, regardless the preferences option "Start in fullscreen"