Floating mode doesn't work on sway
I'm running current main.
With --restricted flag it works for some sizes.
$ wl-kbptr -o modes=floating,click -o mode_floating.source=detect
warn: Could not open config file '/home/mtvrs/.config/wl-kbptr/config'
*** BUG ***
In create_bits_image_internal: The expression bits == NULL || (rowstride_bytes % sizeof (uint32_t)) == 0 was false
Set a breakpoint on '_pixman_log_error' to debug
err: Failed to create pixman image.
I looked around and made quick fix:
https://github.com/mtvrsh/wl-kbptr/commit/2068ffcaa60f22ddb0c6da20cdf8d021ff7f3e05
With this commit floating mode reliably works and floating mode with --restrict flag fails much less.
Not sure why it would not fail with your fix. It's only reducing the size of the area by one pixel on each edge. Maybe there's a bug before that that sets the initial area to 0x0 and then it creates an invalid area but then even with your fix it shouldn't behave normally. 🤔
I have a few questions to see if I could reproduce this on my end:
- What version of Sway are you using?
swaymsg -t get_outputs?- Are you running it with 10bit depth rendering or any other display settings that would not be shown with
swaymsg -t get_outputs?
Sure, thanks for looking into it.
- sway version 1.11
Output DP-1 'Iiyama North America PL2770QS 1183222201290' (focused)
Current mode: 2560x1440 @ 165.153 Hz
Power: on
Position: 0,0
Scale factor: 1.000000
Scale filter: nearest
Subpixel hinting: unknown
Transform: normal
Workspace: 1
Max render time: off
Adaptive sync: disabled
Allow tearing: no
Available modes:
2560x1440 @ 59.951 Hz
2560x1440 @ 165.153 Hz
2560x1440 @ 143.856 Hz
2560x1440 @ 119.881 Hz
2560x1080 @ 59.939 Hz
2048x1280 @ 59.962 Hz
1920x1200 @ 59.885 Hz
1920x1080 @ 119.879 Hz
1920x1080 @ 60.000 Hz
1920x1080 @ 59.939 Hz
1920x1080 @ 50.000 Hz
1600x1200 @ 60.000 Hz
1680x1050 @ 59.954 Hz
1600x1000 @ 59.872 Hz
1600x900 @ 60.000 Hz
1280x1024 @ 75.025 Hz
1440x900 @ 59.887 Hz
1280x720 @ 59.943 Hz
1280x720 @ 50.000 Hz
1024x768 @ 75.029 Hz
1024x768 @ 60.004 Hz
800x600 @ 75.000 Hz
800x600 @ 60.317 Hz
720x576 @ 50.000 Hz
720x480 @ 59.940 Hz
640x480 @ 75.000 Hz
640x480 @ 59.940 Hz
640x480 @ 59.929 Hz
Output HDMI-A-1 'BNQ BenQ GW2480 R8J0174401Q'
Current mode: 1920x1080 @ 60.000 Hz
Power: on
Position: 2560,360
Scale factor: 1.000000
Scale filter: nearest
Subpixel hinting: unknown
Transform: normal
Workspace: 10
Max render time: off
Adaptive sync: disabled
Allow tearing: no
Available modes:
1920x1080 @ 60.000 Hz
1920x1080 @ 59.939 Hz
1920x1080 @ 50.000 Hz
1680x1050 @ 59.954 Hz
1600x900 @ 60.000 Hz
1280x1024 @ 75.025 Hz
1280x1024 @ 60.020 Hz
1280x800 @ 59.810 Hz
1280x720 @ 60.000 Hz
1280x720 @ 59.943 Hz
1280x720 @ 50.000 Hz
1024x768 @ 75.029 Hz
1024x768 @ 60.004 Hz
800x600 @ 75.000 Hz
800x600 @ 60.317 Hz
720x576 @ 50.000 Hz
720x480 @ 59.940 Hz
640x480 @ 75.000 Hz
640x480 @ 59.940 Hz
640x480 @ 59.929 Hz
- Both displays are 8bit. Only thing I changed from defaults is position and mode. I am using nvidia, probably unrelated but who knows.
Not sure why it's doing this. I can't think of anything exotic with your system. I still haven't been able to replicate the issue. I've added some debug logs so that maybe it could give us a clue. 🤷