Skip to content

Commit

Permalink
Drop check for wlr_seat_touch_notify_cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
agx committed Jul 24, 2023
1 parent 630a7e4 commit 47adeda
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
10 changes: 0 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,9 @@ if not embed_wlroots.disabled() and wlroots_proj.found()
wlroots = wlroots_proj.get_variable('wlroots')
wlroots_conf = wlroots_proj.get_variable('conf_data')
wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1
have_wlr_seat_touch_notify_cancel = true
else
wlroots = dependency('wlroots', version: '>= 0.16.0')
wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include <wlr/config.h>', dependencies: wlroots) == '1'
have_wlr_seat_touch_notify_cancel = false
if cc.has_function('wlr_seat_touch_notify_cancel',
args: '-DWLR_USE_UNSTABLE',
dependencies: wlroots)
have_wlr_seat_touch_notify_cancel = true
endif
endif

if get_option('xwayland').enabled() and not wlroots_has_xwayland
Expand Down Expand Up @@ -143,9 +136,6 @@ config_h.set_quoted('PHOC_APP_ID', 'sm.puri.Phoc')
config_h.set_quoted('PHOC_VERSION', meson.project_version())
config_h.set('PHOC_XWAYLAND', have_xwayland,
description: 'Whether xwayland is enabled')
config_h.set('PHOC_HAVE_WLR_SEAT_TOUCH_NOTIFY_CANCEL', have_wlr_seat_touch_notify_cancel,
description: '''Whether we have needed functions for toch gesture cancel
Can be dropped with wlroots 0.16.0''')

phoc_config_h = configure_file(
output: 'phoc-config.h',
Expand Down
4 changes: 0 additions & 4 deletions phoc-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@

/* Whether xwayland is enabled */
#mesondefine PHOC_XWAYLAND

/* Whether we have needed functions for toch gesture cancel */
/* Can be dropped with wlroots 0.16 */
#mesondefine PHOC_HAVE_WLR_SEAT_TOUCH_NOTIFY_CANCEL
4 changes: 0 additions & 4 deletions src/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ on_drag_update (PhocGesture *gesture, double off_x, double off_y, PhocCursor *se
switch (state) {
case PHOC_DRAGGABLE_SURFACE_STATE_DRAGGING:
if (phoc_seat_has_touch (self->seat)) {
#ifdef PHOC_HAVE_WLR_SEAT_TOUCH_NOTIFY_CANCEL
PhocLayerSurface *layer_surface =
phoc_draggable_layer_surface_get_layer_surface (priv->drag_surface);
GList *seqs = phoc_gesture_get_sequences (gesture);
Expand All @@ -566,9 +565,6 @@ on_drag_update (PhocGesture *gesture, double off_x, double off_y, PhocCursor *se
phoc_layer_surface_get_namespace (layer_surface));
wlr_seat_touch_notify_cancel (self->seat->seat,
layer_surface->layer_surface->surface);
#else
g_warning_once ("wlroots lacks wlr_seat_touch_send_wl_cancel support, can't cancel gesture");
#endif /* PHOC_HAVE_WLR_SEAT_TOUCH_NOTIFY_CANCEL */
}
break;
case PHOC_DRAGGABLE_SURFACE_STATE_REJECTED:
Expand Down

0 comments on commit 47adeda

Please sign in to comment.