Skip to content

Fix #3: suppress status tips from playlist dock when floating#18

Draft
struktured wants to merge 1 commit intomasterfrom
fix/issue-3-status-bar-window
Draft

Fix #3: suppress status tips from playlist dock when floating#18
struktured wants to merge 1 commit intomasterfrom
fix/issue-3-status-bar-window

Conversation

@struktured
Copy link
Copy Markdown
Contributor

@struktured struktured commented Apr 25, 2026

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 presetPlayListDockWidget and the tableView that consumes QEvent::StatusTip when 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

  • Clean build
  • Dual-monitor: undock playlist, drag to second screen, hover over presets — main window's status bar no longer shows the hover text (needs manual verification on a multi-monitor system)
  • Tested locally end-to-end (dual-monitor: undock playlist, move to second screen, hover over presets, verify main window's status bar stays empty)

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>
@struktured struktured requested a review from Copilot April 25, 2026 14:54
@struktured struktured marked this pull request as draft April 25, 2026 14:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::StatusTip events 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, prefer static_cast<QMouseEvent*>(event) (or auto* 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.

@struktured struktured self-assigned this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menue Info Line on the ground stays in the main Window an not in the Menue Window

2 participants