Fix #3: suppress status tips from playlist dock when floating#18
Draft
struktured wants to merge 1 commit intomasterfrom
Draft
Fix #3: suppress status tips from playlist dock when floating#18struktured wants to merge 1 commit intomasterfrom
struktured wants to merge 1 commit intomasterfrom
Conversation
When the playlist dock widget is undocked and moved to a separate screen (typical multi-monitor setup with a beamer/projector), Qt's default behavior propagates QStatusTipEvents from the playlist's items up to the main window's status bar. The hover info appears on the wrong screen. Install an event filter on the dock widget and table view that consumes QStatusTipEvent when the dock is floating, preventing propagation to the main window's status bar. Tooltips still work normally and appear at the cursor on the correct screen. Closes #3 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #3 where hovering over items in a floating preset playlist dock causes status tip text to appear in the main window’s status bar (potentially on the wrong screen in multi-monitor setups).
Changes:
- Installs an event filter on the preset playlist dock widget and its table view.
- Consumes
QEvent::StatusTipevents when the dock is floating to prevent propagation to the main window status bar.
Comments suppressed due to low confidence (1)
src/common/qprojectm_mainwindow.cpp:1430
eventFilter()uses C-style casts((QMouseEvent*)event)when handling mouse events. Since this is C++ and the cast is easy to tighten, preferstatic_cast<QMouseEvent*>(event)(orauto* mouseEvent = static_cast<QMouseEvent*>(event)once) to avoid the broader semantics of C-style casts and improve readability.
if (event->type() == QEvent::MouseButtonDblClick && ((QMouseEvent*)event)->button() == Qt::LeftButton) {
this->setWindowState ( this->windowState() ^ Qt::WindowFullScreen );
return true;
} else if (event->type() == QEvent::MouseButtonPress && ((QMouseEvent*)event)->button() == Qt::RightButton) {
setMenuVisible(!_menuVisible);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3
Summary
When the preset playlist dock widget is undocked and moved to a second screen (typical "beamer/projector + control monitor" setup), hovering over preset items causes the info text to appear in the main window's status bar — on the wrong screen. The user wants the info to stay with the playlist window or not show at all on the visualization screen.
Fix
Install an event filter on
presetPlayListDockWidgetand thetableViewthat consumesQEvent::StatusTipwhen the dock is floating. The events would otherwise propagate up the QObject parent chain to the main window's status bar.Tooltips (the floating yellow popup boxes) still work normally and follow the cursor to the correct screen via Qt's window manager hints.
Test plan