Skip to content

Commit

Permalink
fix: incorrect line opacity mapping
Browse files Browse the repository at this point in the history
current code treats opacity as [0, 100] even though the manpage
documents it as being [0, 255].

Fixes: #281
  • Loading branch information
N-R-K committed May 27, 2024
1 parent bd565cc commit 95350f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selection_edge.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void selectionEdgeCreate(void)
HeightOfScreen(scr), 0, CopyFromParent, InputOutput, CopyFromParent,
CWOverrideRedirect | CWBackPixel, &attr);

unsigned long opacity = opt.lineOpacity * ((unsigned)-1 / 100);
unsigned long opacity = opt.lineOpacity * (0xFFFFFFFFu / 255);

XChangeProperty(disp, pe->wndDraw,
XInternAtom(disp, "_NET_WM_WINDOW_OPACITY", False), XA_CARDINAL, 32,
Expand Down

0 comments on commit 95350f6

Please sign in to comment.