Skip to content

Fix switching monitors which are located at the same position.#1316

Merged
ThomasAdam merged 1 commit into
fvwmorg:mainfrom
tzimisces:tzimisces/fix-switch-monitors
May 18, 2026
Merged

Fix switching monitors which are located at the same position.#1316
ThomasAdam merged 1 commit into
fvwmorg:mainfrom
tzimisces:tzimisces/fix-switch-monitors

Conversation

@tzimisces
Copy link
Copy Markdown
Contributor

@tzimisces tzimisces commented May 10, 2026

  • What does this PR do?

When simultaneously disabling and enabling monitor which are placed at the same position, Fvwm will chicken out because it comes to believe that no monitor is active anymore.
This is in a sense caused by the way scan_screens processes changes, however, can be fixed by changing monitor_compare. The latter only considers the position of a monitor, and if a monitor is en - or disabled. When inserting a monitor into the RB-tree, a previously unknown monitor will be considered the same as the one being disabled.
By extending the criteria by which monitors are checked, monitors which actually differ are not considered being the same anymore, and a previously unknown one is properly added to the RB-tree. After insertion, the process in scan_screens will yield a correct configuration and Fvwm will happily continue.

fixes #1281

When simultaneously disabling and enabling monitor which are placed at
the same position, Fvwm will chicken out because it comes to believe
that no monitor is active anymore.
This is in a sense caused by the way scan_screens processes changes,
however, can be fixed by changing monitor_compare.
The latter only considers the position of a monitor, and if a monitor is
en - or disabled. When inserting a monitor into the RB-tree, a
previously unknown monitor will be considered the same as the one being
disabled.
By extending the criteria by which monitors are checked, monitors which
actually differ are not considered being the same anymore, and a
previously unknown one is properly added to the RB-tree.
After insertion, the process in scan_screens will yield a correct
configuration and Fvwm will happily continue.

fixes fvwmorg#1281
@ThomasAdam ThomasAdam self-assigned this May 18, 2026
@ThomasAdam ThomasAdam added the type:bug Something's broken! label May 18, 2026
@ThomasAdam ThomasAdam added this to FVWM3 May 18, 2026
@github-project-automation github-project-automation Bot moved this to PRs in FVWM3 May 18, 2026
@ThomasAdam ThomasAdam added this to the 1.1.5 milestone May 18, 2026
@ThomasAdam ThomasAdam merged commit 73f2c24 into fvwmorg:main May 18, 2026
10 of 11 checks passed
@github-project-automation github-project-automation Bot moved this from PRs to Done in FVWM3 May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something's broken!

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

When switching to external monitor: fvwm 1.1.3 does not track size, fvwm 1.1.4 exits

2 participants