mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
fix: buttonpress return types and tablet motion arguments
This commit is contained in:
parent
6d56a3edd7
commit
6fccd894ef
2 changed files with 10 additions and 8 deletions
|
|
@ -50,7 +50,7 @@ static void attach_tablet_pad(struct TabletPad *tablet_pad,
|
|||
struct Tablet *tablet);
|
||||
static void tablettoolmotion(struct TabletTool *tool, bool change_x,
|
||||
bool change_y, double x, double y, double dx,
|
||||
double dy);
|
||||
double dy, uint32_t time_msec);
|
||||
|
||||
static struct wl_listener tablet_tool_axis = {.notify = tablettoolaxis};
|
||||
static struct wl_listener tablet_tool_button = {.notify = tablettoolbutton};
|
||||
|
|
@ -234,7 +234,8 @@ static void tablettoolsetcursor(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
void tablettoolmotion(struct TabletTool *tool, bool change_x, bool change_y,
|
||||
double x, double y, double dx, double dy) {
|
||||
double x, double y, double dx, double dy,
|
||||
uint32_t time_msec) {
|
||||
struct wlr_surface *surface = NULL;
|
||||
Client *c = NULL, *w = NULL;
|
||||
LayerSurface *l = NULL;
|
||||
|
|
@ -257,7 +258,7 @@ void tablettoolmotion(struct TabletTool *tool, bool change_x, bool change_y,
|
|||
break;
|
||||
}
|
||||
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
motionnotify(time_msec, NULL, 0, 0, 0, 0);
|
||||
|
||||
if (config.sloppyfocus)
|
||||
selmon = xytomon(cursor->x, cursor->y);
|
||||
|
|
@ -355,7 +356,8 @@ void tablettoolproximity(struct wl_listener *listener, void *data) {
|
|||
tool->curr_surface = NULL;
|
||||
break;
|
||||
case WLR_TABLET_TOOL_PROXIMITY_IN:
|
||||
tablettoolmotion(tool, true, true, event->x, event->y, 0, 0);
|
||||
tablettoolmotion(tool, true, true, event->x, event->y, 0, 0,
|
||||
event->time_msec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -368,7 +370,7 @@ void tablettoolaxis(struct wl_listener *listener, void *data) {
|
|||
|
||||
tablettoolmotion(tool, event->updated_axes & WLR_TABLET_TOOL_AXIS_X,
|
||||
event->updated_axes & WLR_TABLET_TOOL_AXIS_Y, event->x,
|
||||
event->y, event->dx, event->dy);
|
||||
event->y, event->dx, event->dy, event->time_msec);
|
||||
|
||||
if (event->updated_axes & WLR_TABLET_TOOL_AXIS_PRESSURE)
|
||||
wlr_tablet_v2_tablet_tool_notify_pressure(tool->tool_v2,
|
||||
|
|
|
|||
|
|
@ -2256,7 +2256,7 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) {
|
|||
grabcy = (int32_t)round(cursor->y);
|
||||
cursor_mode = CurPan;
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "grabbing");
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2345,7 +2345,7 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) {
|
|||
selmon->canvas_overview_anim_start = get_now_in_ms();
|
||||
arrange(selmon, true, false);
|
||||
request_fresh_all_monitors();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (selmon->isoverview && event->button == BTN_RIGHT && c) {
|
||||
|
|
@ -2367,7 +2367,7 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) {
|
|||
cursor_mode = CurNormal;
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
/* If you released any buttons, we exit interactive move/resize mode. */
|
||||
if (!locked && cursor_mode != CurNormal && cursor_mode != CurPressed) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue