Skip to content

Conversation

@patrick96
Copy link
Member

@patrick96 patrick96 commented Mar 20, 2022

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

If only cursor-click or cursor-scroll is defined, but not the other, the
bar could try to set the cursor to the empty string which resulted in an
error.

Minimal example:

[bar/example]
modules-left = text

enable-ipc = true

; cursor-click = pointer
cursor-scroll = ns-resize

[module/text]
type = custom/text
content = %{A1:true:}Click%{A1}%{A4:true:}Scroll%{A4}

When mousing over Scroll and then over Click, polybar produces an error because it tries to change the cursor from ns-resize to the empty string (which is not valid).

Related Issues & Documents

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

If only cursor-click or cursor-scroll is defined, but not the other, the
bar could try to set the cursor to the empty string which resulted in an
error.
Makes it much easier to debug from error messages.
@codecov
Copy link

codecov bot commented Mar 20, 2022

Codecov Report

Merging #2656 (3c6ec4e) into hotfix/3.6.2 (b05b3a4) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##           hotfix/3.6.2    #2656   +/-   ##
=============================================
  Coverage         13.78%   13.79%           
=============================================
  Files               153      153           
  Lines             11272    11268    -4     
=============================================
  Hits               1554     1554           
+ Misses             9718     9714    -4     
Flag Coverage Δ
unittests 13.79% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/components/types.hpp 11.36% <ø> (ø)
include/events/signal.hpp 0.00% <ø> (ø)
src/components/bar.cpp 0.00% <0.00%> (ø)
src/components/controller.cpp 0.00% <0.00%> (ø)
src/x11/cursor.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b05b3a4...3c6ec4e. Read the comment docs.

@patrick96 patrick96 added this to the 3.6.2 milestone Mar 20, 2022
@patrick96 patrick96 merged commit 9b7bfae into polybar:hotfix/3.6.2 Mar 20, 2022
@patrick96 patrick96 deleted the invalid-cursor branch March 20, 2022 19:18
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.

1 participant