- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.4k
 
Fix multi-argument gesture dispatcher parsing #11721
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
Conversation
| 
           Huh. The code style pipeline fails for a line that I never edited.  | 
    
61b1002    to
    d7bc4a0      
    Compare
  
    The `dispatcher` gesture handler used to only handle the first argument to the dispatcher, while some dispatchers (e.g., `sendshortcut`) want multiple arguments. This fixes `ConfigManager` to handle all the arguments provided to the dispatcher gesture handler. Fixes hyprwm#11684.
Reduce code duplication in the gestures test.
d7bc4a0    to
    343a4ad      
    Compare
  
    | 
           @vaxerski, ahh, unfortunately, this MR breaks something. Consider the line: According to the code, we find the last comma and take the first character after it, which is a space. The  I want to submit a fix, but I am not sure which function's fault is it: are dispatchers supposed to handle whitespaces, so we need to update   | 
    
| 
           I can see that  However, should dispatcher functions accept   | 
    
* config: Fix multi-argument gesture dispatchers parsing The `dispatcher` gesture handler used to only handle the first argument to the dispatcher, while some dispatchers (e.g., `sendshortcut`) want multiple arguments. This fixes `ConfigManager` to handle all the arguments provided to the dispatcher gesture handler. Fixes hyprwm#11684. * test/gestures: Add a test for a gesture with a multi-argument dispatcher * test/gestures: Factor out `waitForWindowCount` Reduce code duplication in the gestures test.
* config: Fix multi-argument gesture dispatchers parsing The `dispatcher` gesture handler used to only handle the first argument to the dispatcher, while some dispatchers (e.g., `sendshortcut`) want multiple arguments. This fixes `ConfigManager` to handle all the arguments provided to the dispatcher gesture handler. Fixes hyprwm#11684. * test/gestures: Add a test for a gesture with a multi-argument dispatcher * test/gestures: Factor out `waitForWindowCount` Reduce code duplication in the gestures test.
* config: Fix multi-argument gesture dispatchers parsing The `dispatcher` gesture handler used to only handle the first argument to the dispatcher, while some dispatchers (e.g., `sendshortcut`) want multiple arguments. This fixes `ConfigManager` to handle all the arguments provided to the dispatcher gesture handler. Fixes hyprwm#11684. * test/gestures: Add a test for a gesture with a multi-argument dispatcher * test/gestures: Factor out `waitForWindowCount` Reduce code duplication in the gestures test.
Describe your PR, what does it fix/add?
The
dispatchergesture handler used to only handlethe first argument to the dispatcher, while some dispatchers
(e.g.,
sendshortcut) want multiple arguments.This fixes
ConfigManagerto handle all the argumentsprovided to the dispatcher gesture handler.
Fixes #11684.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
An alternative implementation could be to join the already parsed arguments with the
,separator. But using the original string feels more portable, e.g., in case future dispatchers may depend on whitespace, etc.Is it ready for merging, or does it need work?
Hopefully, ready for merge!