Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PanFrames: handle DesktopConfiguration changes #438

Merged
merged 3 commits into from
Feb 22, 2021

Conversation

ThomasAdam
Copy link
Member

@ThomasAdam ThomasAdam commented Feb 20, 2021

When panframes are created, the DesktopConfiguration is taken in to
account. This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through. This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more. In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401

@ThomasAdam ThomasAdam self-assigned this Feb 20, 2021
When `DesktopConfigutation` is toggled between `global` and
`per-monitor` ensure that the cursor in the panframes are reset
correctly.  This wasn't happening for `global` mode.
@ThomasAdam ThomasAdam changed the title ta/panframe improvements PanFrames: handle DesktopConfiguration changes Feb 20, 2021
When panframes are created, the DesktopConfiguration is taken in to
account.  This means that during startup, the panframes will be
initialised in the global state, but could change to being per-monitor
shortly afterward.

The implementation assumed that all monitors would needed to have been
checked, however this isn't true in the case of per-monitor mode; as a
result, panframes around other monitors were being unmapped.

Instead, callers of checkPanFrames() already know which monitor needs to
be involved and can pass that through.  This change removes the previous
should_free_panframe() call as it's never used from more than one place,
so can be inlined once more.  In doing so, s/Bool/bool/ since Bool is
reserved for X11 purposes.

Fixes #381, fixes #401
Introduce the static function `init_one_panframe()` to remove code
duplication when setting up PanFrames between global and per-monitor
mode.

Fixes #381, fixes #401
@ThomasAdam ThomasAdam added the type:bug Something's broken! label Feb 22, 2021
@ThomasAdam ThomasAdam added this to the 1.0.3 milestone Feb 22, 2021
@ThomasAdam ThomasAdam merged commit da34db3 into master Feb 22, 2021
@ThomasAdam ThomasAdam deleted the ta/panframe-improvements branch February 22, 2021 21:19
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.

EdgeScroll does not work
1 participant