disable pointer warp

This commit is contained in:
korei999 2024-01-04 01:45:57 +02:00
parent 5adc681b87
commit 56c19349a1
2 changed files with 10 additions and 14 deletions

View file

@ -151,10 +151,9 @@ static const char* Term[] = { "footclient", NULL };
static const char* TermAlt[] = { "foot", "--maximized", NULL }; static const char* TermAlt[] = { "foot", "--maximized", NULL };
static const char* Menu[] = { "fuzzel", NULL }; static const char* Menu[] = { "fuzzel", NULL };
static const char* PowerMenu[] = { "powermenu.sh", NULL }; static const char* PowerMenu[] = { "powermenu.sh", NULL };
static const char* AudioUpdate[] = { "pkill", "-RTMIN+12", "someblocks", NULL }; static const char* AudioLower[] = { "vol.sh", "l", NULL };
static const char* AudioLower[] = { "wpctl", "set-volume", "-l", "1", "@DEFAULT_AUDIO_SINK@", "3%-", NULL }; static const char* AudioRaise[] = { "vol.sh", "r", NULL };
static const char* AudioRaise[] = { "wpctl", "set-volume", "-l", "1", "@DEFAULT_AUDIO_SINK@", "3%+", NULL }; static const char* AudioMute[] = { "vol.sh", "m", NULL };
static const char* AudioMute[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
static const char* MuteMic[] = { "MuteMic.sh", NULL }; static const char* MuteMic[] = { "MuteMic.sh", NULL };
static const char* AudioPlayPause[] = { "playerctl", "play-pause", NULL }; static const char* AudioPlayPause[] = { "playerctl", "play-pause", NULL };
static const char* AudioPause[] = { "playerctl", "pause", NULL }; static const char* AudioPause[] = { "playerctl", "pause", NULL };
@ -192,9 +191,6 @@ static const Key keys[] = {
{ 0, Key_XF86AudioMute, spawn, { .v = AudioMute } }, { 0, Key_XF86AudioMute, spawn, { .v = AudioMute } },
{ 0, Key_XF86AudioMicMute, spawn, { .v = MuteMic } }, { 0, Key_XF86AudioMicMute, spawn, { .v = MuteMic } },
{ SUPER, Key_n, spawn, { .v = MuteMic } }, { SUPER, Key_n, spawn, { .v = MuteMic } },
{ 0, Key_XF86AudioLowerVolume, spawn, { .v = AudioUpdate } },
{ 0, Key_XF86AudioRaiseVolume, spawn, { .v = AudioUpdate } },
{ 0, Key_XF86AudioMute, spawn, { .v = AudioUpdate } },
{ 0, Key_XF86MonBrightnessUp, spawn, { .v = BMonUp } }, { 0, Key_XF86MonBrightnessUp, spawn, { .v = BMonUp } },
{ 0, Key_XF86MonBrightnessDown, spawn, { .v = BMonDown } }, { 0, Key_XF86MonBrightnessDown, spawn, { .v = BMonDown } },
{ 0, Key_Print, spawn, { .v = Print } }, { 0, Key_Print, spawn, { .v = Print } },

14
dwl.c
View file

@ -1158,16 +1158,16 @@ void
cursorwarptohint(void) cursorwarptohint(void)
{ {
Client *c = NULL; Client *c = NULL;
double sx, sy; // double sx, sy;
toplevel_from_wlr_surface(active_constraint->surface, &c, NULL); toplevel_from_wlr_surface(active_constraint->surface, &c, NULL);
/* TODO: wlroots 0.18: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478 */ /* TODO: wlroots 0.18: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478 */
if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) { // if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) {
sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw; // sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw;
sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw; // sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw;
wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y); // wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y);
wlr_seat_pointer_warp(seat, sx, sy); // wlr_seat_pointer_warp(seat, sx, sy);
} // }
} }
void void