Преглед изворни кода

Fix an inverted condition in Wayland pen tip handling

hwsmm пре 3 месеци
родитељ
комит
3b12019892
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/video/wayland/SDL_waylandevents.c

+ 1 - 1
src/video/wayland/SDL_waylandevents.c

@@ -3458,7 +3458,7 @@ static void tablet_tool_handle_frame(void *data, struct zwp_tablet_tool_v2 *tool
 
     // I don't know if this is necessary (or makes sense), but send motion before pen downs, but after pen ups, so you don't get unexpected lines drawn.
     if (sdltool->frame.have_motion && sdltool->frame.tool_state) {
-        if (sdltool->frame.tool_state == WAYLAND_TABLET_TOOL_STATE_UP) {
+        if (sdltool->frame.tool_state == WAYLAND_TABLET_TOOL_STATE_DOWN) {
             SDL_SendPenMotion(timestamp, instance_id, window, sdltool->frame.x, sdltool->frame.y);
             SDL_SendPenTouch(timestamp, instance_id, window, false, true);  // !!! FIXME: how do we know what tip is in use?
         } else {