void view_child_init(struct view_child *child, struct view *view,
struct wlr_surface *wlr_surface);
void view_child_finish(struct view_child *child);
-void view_subsurface_create(struct view *view, struct wlr_subsurface *wlr_subsurface);
+void view_subsurface_create(struct view *view,
+ struct wlr_subsurface *wlr_subsurface);
void view_set_activated(struct view *view, bool activated);
void view_close(struct view *view);
* @current: reference point for finding next view to cycle to
* Note: If !current, the server->views second focusable view is returned
*/
-struct view *desktop_cycle_view(struct server *server, struct view *current, enum lab_cycle_dir dir);
+struct view *desktop_cycle_view(struct server *server, struct view *current,
+ enum lab_cycle_dir dir);
struct view *desktop_focused_view(struct server *server);
void desktop_focus_topmost_mapped_view(struct server *server);
bool isfocusable(struct view *view);
void server_start(struct server *server);
void server_finish(struct server *server);
-void action(struct view *activator, struct server *server, const char *action, const char *command,
- uint32_t resize_edges);
+void action(struct view *activator, struct server *server, const char *action,
+ const char *command, uint32_t resize_edges);
/* update onscreen display 'alt-tab' texture */
void osd_update(struct server *server);
struct seat *seat = wl_container_of(
listener, seat, request_start_drag);
struct wlr_seat_request_start_drag_event *event = data;
- if (wlr_seat_validate_pointer_grab_serial(seat->seat, event->origin, event->serial)) {
- wlr_seat_start_pointer_drag(seat->seat, event->drag, event->serial);
+ if (wlr_seat_validate_pointer_grab_serial(seat->seat, event->origin,
+ event->serial)) {
+ wlr_seat_start_pointer_drag(seat->seat, event->drag,
+ event->serial);
} else {
wlr_data_source_destroy(event->drag->source);
}
if (!seat->current_constraint) {
/*
* The cursor doesn't move unless we tell it to. The cursor
- * automatically handles constraining the motion to the output layout,
- * as well as any special configuration applied for the specific input
- * device which generated the event. You can pass NULL for the device
- * if you want to move the cursor around without any input.
+ * automatically handles constraining the motion to the output
+ * layout, as well as any special configuration applied for the
+ * specific input device which generated the event. You can pass
+ * NULL for the device if you want to move the cursor around
+ * without any input.
*/
wlr_cursor_move(seat->cursor, event->device, event->delta_x,
event->delta_y);
if (!seat->current_constraint) {
/*
* The cursor doesn't move unless we tell it to. The cursor
- * automatically handles constraining the motion to the output layout,
- * as well as any special configuration applied for the specific input
- * device which generated the event. You can pass NULL for the device
- * if you want to move the cursor around without any input.
+ * automatically handles constraining the motion to the output
+ * layout, as well as any special configuration applied for the
+ * specific input device which generated the event. You can pass
+ * NULL for the device if you want to move the cursor around
+ * without any input.
*/
- wlr_cursor_move(seat->cursor, event->device, dx, dy);
- }
+ wlr_cursor_move(seat->cursor, event->device, dx, dy); }
process_cursor_motion(seat->server, event->time_msec);
}
static bool
-handle_release_mousebinding(struct view *view, struct server *server, uint32_t button, uint32_t modifiers, enum ssd_part_type view_area, uint32_t resize_edges)
+handle_release_mousebinding(struct view *view, struct server *server,
+ uint32_t button, uint32_t modifiers,
+ enum ssd_part_type view_area, uint32_t resize_edges)
{
struct mousebind *mousebind;
bool activated_any = false;
return false;
}
if (ms < double_click_speed && ms >= 0) {
- /* end sequence so that third click is not considered a double-click */
+ /*
+ * End sequence so that third click is not considered a
+ * double-click
+ */
last_button = 0;
return true;
}
}
static bool
-handle_press_mousebinding(struct view *view, struct server *server, uint32_t button, uint32_t modifiers, enum ssd_part_type view_area, uint32_t resize_edges)
+handle_press_mousebinding(struct view *view, struct server *server,
+ uint32_t button, uint32_t modifiers,
+ enum ssd_part_type view_area, uint32_t resize_edges)
{
struct mousebind *mousebind;
bool double_click = is_double_click(rc.doubleclick_time, button);
/* Handle _release_ on root window */
if (!view) {
- handle_release_mousebinding(NULL, server, event->button, modifiers, LAB_SSD_ROOT, 0);
+ handle_release_mousebinding(NULL, server, event->button,
+ modifiers, LAB_SSD_ROOT, 0);
}
goto mousebindings;
}
/* Handle _press_ on root window */
if (!view) {
- handle_press_mousebinding(NULL, server, event->button, modifiers, LAB_SSD_ROOT, 0);
+ handle_press_mousebinding(NULL, server,
+ event->button, modifiers, LAB_SSD_ROOT, 0);
return;
}
mousebindings:
if (event->state == WLR_BUTTON_RELEASED) {
- triggered_frame_binding |= handle_release_mousebinding(view, server, event->button, modifiers, view_area, resize_edges);
+ triggered_frame_binding |= handle_release_mousebinding(view,
+ server, event->button, modifiers,
+ view_area, resize_edges);
} else if (event->state == WLR_BUTTON_PRESSED) {
- triggered_frame_binding |= handle_press_mousebinding(view, server, event->button, modifiers, view_area, resize_edges);
+ triggered_frame_binding |= handle_press_mousebinding(view,
+ server, event->button, modifiers,
+ view_area, resize_edges);
}
if (!triggered_frame_binding) {
/* Notify client with pointer focus of button press */