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

mouse combo handler #1217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

mouse combo handler #1217

wants to merge 1 commit into from

Conversation

barkyq
Copy link
Contributor

@barkyq barkyq commented Jan 10, 2024

Description

Make it so shift + mousekey + click + drag resizes windows.

Remove static quantities from state struct.

Fixes #1213

Type of change

  • Development change (no change visible to user)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Updated user documentation:

Holding down mousekey while left-clicking is used to move windows, and holding down mousekey while right-clicking is used to resize windows. Alternativiely, one can hold mousekey and Shift while left-clicking to resize windows.

Checklist:

  • Ran make test locally with no errors or warnings reported
    Note: To fully reproduce CI checks, you will need to run make test-full-nix. Usually, this is not necessary.
  • Manual page has been updated accordingly
  • Wiki pages have been updated accordingly (to perform after merge)

@barkyq
Copy link
Contributor Author

barkyq commented Jan 10, 2024

Some of my changes are opinionated, and happy to change anything which rubs you the wrong way!

@mautamu
Copy link
Member

mautamu commented Jan 10, 2024

This looks good to me but will wait to merge to see if anyone else has any comments since I'm admittedly not a heavy user of this functionality. Thanks again for all your changes this week :) !

Feel free to rebase and force push 7d86f72 away if you'd like.

remove static quantities from state struct
Copy link
Contributor

@Eskaan Eskaan left a comment

Choose a reason for hiding this comment

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

You don't have to move the implementation to the Manager to get direct access to the config, we already load it into the State struct.

@barkyq
Copy link
Contributor Author

barkyq commented Jan 11, 2024

I guess I was confused why these configuration settings are loaded into the state, since these settings do not change. As far as I can tell, the state should be for storing information which is changed by the program.

Moreover, most of the other handlers in display_event_handler.rs use the Manager rather than the state.

@barkyq
Copy link
Contributor Author

barkyq commented Jan 11, 2024

related to the discussion in #1219 about what config variables should be stored in State struct.

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.

Add a way to resize floating windows with the left mouse button.
3 participants