Skip to content

[Feature Request] Open control window on the screen where the cursor is at startup #247

Description

@obook

Describe the problem

On a 4 monitors setup, OpenBoard always opens its control window on the same fixed screen (screen 0, the first DVI output of the GPU), regardless of where the mouse cursor is or which monitor the user is actively working on.

Expected behavior

At startup, OpenBoard should detect the screen where the cursor is located and open the control window on that screen.

When the "multi-screen" option is enabled, the expected behavior is:

  • Control window: opens on the screen where the cursor is at startup.
  • Projection window: opens on the next screen in DVI enumeration order (screen index + 1 or 0).
  • Third screen (and beyond): currently receives a black OpenBoard window that covers the entire display. This window can be closed manually without quitting OpenBoard, but it reappears at every launch. This is a separate bug (Black window with multiscreen OpenBoard-org/OpenBoard#516 is related), but it interacts with the screen selection problem: fixing startup placement should also clarify which
    screen gets this spurious window, or ideally suppress it entirely.

Qt API

Qt >= 5.10 provides a clean API for this:

    QScreen *screen = QGuiApplication::screenAt(QCursor::pos());

This returns the screen containing the cursor position at the time of the call, which is exactly what is needed at startup.

Environment

  • OpenBoard version: 1.7.7
  • OS: KDE neon user edition (eq LTS 24.04) wayland
  • GPU / outputs: Nvidia P2000 4 DVI outputs
  • Desktop: plasma 6.7.3

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions