racket / racket/gui

Message-box in multi-monitor setup shows in primary monitor instead of parent.

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

In a multi-monitor setup (There are physically more than one screen connected to a PC) showing a message-box outside of primary monitor shows the message box at the edge of the primary monitor instead of at the center of its parent.

I am on Windows 7 if that matters.

Here is the minimum code needed to replicate this:

#lang racket

(require racket/gui)

(define frame (new frame%
                   [label ""]
                   [min-width 200]))

(void (new button%
           [parent frame]
           [label "Show Message Box"]
           [callback (lambda (button event)
                       (message-box "Message Box" "Message" frame))]))

(send frame show #t)

Here is what happens on the primary monitor:

right

Here is what happens on the second monitor:

wrong

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the minimal Racket GUI example from the issue on Windows 7 with multiple monitors, placing the parent frame on the secondary monitor. Trace how message-box uses its parent when positioning the dialog. Done means the message box is centered on its parent monitor rather than appearing at the edge of the primary monitor.

Written by the indexing model from the issue text.

Assessment

Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.