rofi 2.1.0
display.c File Reference
#include "helper.h"
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <math.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <unistd.h>
#include <cairo.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <wayland-client.h>
#include <wayland-cursor.h>
#include <xkbcommon/xkbcommon-compose.h>
#include <xkbcommon/xkbcommon.h>
#include <libgwater-wayland.h>
#include <nkutils-bindings.h>
#include <rofi.h>
#include "input-codes.h"
#include "keyb.h"
#include "rofi-types.h"
#include "settings.h"
#include "view.h"
#include "display-internal.h"
#include "display.h"
#include "wayland-internal.h"
#include "keyboard-shortcuts-inhibit-unstable-v1-protocol.h"
#include "primary-selection-unstable-v1-protocol.h"
#include "text-input-unstable-v3-protocol.h"
#include "wlr-layer-shell-unstable-v1-protocol.h"
Include dependency graph for display.c:

Go to the source code of this file.

Data Structures

struct  wayland_output
struct  wayland_buffer
struct  _display_buffer_pool
struct  clipboard_read_info

Macros

#define G_LOG_DOMAIN   "Wayland"
#define wayland_output_get_dpi(output, scale, dimension)
#define WHEEL_DETENT   120
#define TOUCH_TAP_SLOP   8
#define TOUCH_AXIS_LOCK   (2 * TOUCH_TAP_SLOP)
#define TOUCH_SCROLL_STEP   30
#define CLIPBOARD_READ_INCREMENT   1024

Typedefs

typedef struct _display_buffer_pool wayland_buffer_pool

Functions

static gboolean wayland_display_late_setup (void)
static void update_cursor_rectangle (struct zwp_text_input_v3 *text_input)
static const struct _view_proxy * wayland_display_view_proxy (void)
static void wayland_buffer_cleanup (wayland_buffer_pool *self)
static void wayland_buffer_release (void *data, struct wl_buffer *buffer)
wayland_buffer_pool * display_buffer_pool_new (gint width, gint height)
void display_buffer_pool_free (wayland_buffer_pool *self)
static void wayland_surface_protocol_enter (void *data, struct wl_surface *wl_surface, struct wl_output *wl_output)
static void wayland_surface_protocol_leave (void *data, struct wl_surface *wl_surface, struct wl_output *wl_output)
static void wayland_frame_callback (void *data, struct wl_callback *callback, uint32_t time)
cairo_surface_t * display_buffer_pool_get_next_buffer (wayland_buffer_pool *pool)
void display_surface_commit (cairo_surface_t *surface)
static void wayland_keyboard_keymap (void *data, struct wl_keyboard *keyboard, enum wl_keyboard_keymap_format format, int32_t fd, uint32_t size)
static void wayland_keyboard_enter (void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
static void wayland_keyboard_leave (void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface)
static gboolean wayland_key_repeat (void *data)
static gboolean wayland_key_repeat_delay (void *data)
static void wayland_keyboard_key (void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t time, uint32_t key, enum wl_keyboard_key_state kstate)
static void wayland_keyboard_modifiers (void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)
static void wayland_keyboard_repeat_info (void *data, struct wl_keyboard *keyboard, int32_t rate, int32_t delay)
static gboolean wayland_cursor_reload_theme (guint scale)
static void wayland_cursor_set_image (int i)
static void wayland_cursor_frame_callback (void *data, struct wl_callback *callback, uint32_t time)
static void wayland_pointer_send_events (wayland_seat *self)
static struct wl_cursor * rofi_cursor_type_to_wl_cursor (struct wl_cursor_theme *theme, RofiCursorType type)
static void wayland_cursor_update_for_seat (wayland_seat *seat)
static void wayland_pointer_enter (void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y)
void wayland_display_set_cursor_type (RofiCursorType type)
static void wayland_pointer_leave (void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface)
static void wayland_pointer_motion (void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t x, wl_fixed_t y)
static void wayland_pointer_button (void *data, struct wl_pointer *pointer, uint32_t serial, uint32_t time, uint32_t button, enum wl_pointer_button_state state)
static void wayland_pointer_axis (void *data, struct wl_pointer *pointer, uint32_t time, enum wl_pointer_axis axis, wl_fixed_t value)
static void wayland_pointer_frame (void *data, struct wl_pointer *pointer)
static void wayland_pointer_axis_source (void *data, struct wl_pointer *pointer, enum wl_pointer_axis_source axis_source)
static void wayland_pointer_axis_stop (void *data, struct wl_pointer *pointer, uint32_t time, enum wl_pointer_axis axis)
static void wayland_pointer_axis_discrete (void *data, struct wl_pointer *pointer, enum wl_pointer_axis axis, int32_t discrete)
static gint wayland_touch_scroll_step (RofiOrientation orientation)
static void wayland_touch_down (void *data, struct wl_touch *touch, uint32_t serial, uint32_t time, struct wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y)
static void wayland_touch_up (void *data, struct wl_touch *touch, uint32_t serial, uint32_t time, int32_t id)
static void wayland_touch_motion (void *data, struct wl_touch *touch, uint32_t time, int32_t id, wl_fixed_t x, wl_fixed_t y)
static void wayland_touch_frame (void *data, struct wl_touch *touch)
static void wayland_touch_cancel (void *data, struct wl_touch *touch)
static void wayland_touch_shape (void *data, struct wl_touch *touch, int32_t id, wl_fixed_t major, wl_fixed_t minor)
static void wayland_touch_orientation (void *data, struct wl_touch *touch, int32_t id, wl_fixed_t orientation)
static void wayland_keyboard_release (wayland_seat *self)
static gboolean clipboard_read_glib_callback (GIOChannel *channel, GIOCondition condition, gpointer opaque)
static gboolean clipboard_read_data (int fd, ClipboardCb callback, void *user_data)
static void data_offer_handle_offer (void *data, struct wl_data_offer *offer, const char *mime_type)
static void data_offer_handle_source_actions (void *data, struct wl_data_offer *wl_data_offer, uint32_t source_actions)
static void data_offer_handle_action (void *data, struct wl_data_offer *wl_data_offer, uint32_t dnd_action)
static void data_device_handle_data_offer (void *data, struct wl_data_device *data_device, struct wl_data_offer *offer)
static void data_device_handle_enter (void *data, struct wl_data_device *wl_data_device, uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id)
static void data_device_handle_leave (void *data, struct wl_data_device *wl_data_device)
static void data_device_handle_motion (void *data, struct wl_data_device *wl_data_device, uint32_t time, wl_fixed_t x, wl_fixed_t y)
static void data_device_handle_drop (void *data, struct wl_data_device *wl_data_device)
static void clipboard_handle_selection (enum clipboard_type cb_type, void *offer)
static void data_device_handle_selection (void *data, struct wl_data_device *data_device, struct wl_data_offer *offer)
static void primary_selection_handle_offer (void *data, struct zwp_primary_selection_offer_v1 *offer, const char *mime_type)
static void primary_selection_device_handle_data_offer (void *data, struct zwp_primary_selection_device_v1 *data_device, struct zwp_primary_selection_offer_v1 *offer)
static void primary_selection_device_handle_selection (void *data, struct zwp_primary_selection_device_v1 *data_device, struct zwp_primary_selection_offer_v1 *offer)
static void wayland_pointer_release (wayland_seat *self)
static void wayland_touch_release (wayland_seat *self)
static void wayland_seat_release (wayland_seat *self)
static void wayland_seat_capabilities (void *data, struct wl_seat *seat, uint32_t capabilities)
static void wayland_seat_name (void *data, struct wl_seat *seat, const char *name)
static void text_input_enter (void *data, struct zwp_text_input_v3 *text_input, struct wl_surface *surface)
static void text_input_leave (void *data, struct zwp_text_input_v3 *text_input, struct wl_surface *surface)
static void text_input_preedit_string (void *data, struct zwp_text_input_v3 *text_input, const char *text, int32_t cursor_begin, int32_t cursor_end)
static void text_input_commit_string (void *data, struct zwp_text_input_v3 *text_input, const char *text)
static void text_input_delete_surrounding_text (void *data, struct zwp_text_input_v3 *text_input, uint32_t before_length, uint32_t after_length)
static void text_input_done (void *data, struct zwp_text_input_v3 *text_input, uint32_t serial)
static void wayland_output_release (wayland_output *self)
static wayland_output * wayland_output_by_name (const char *name)
double wayland_get_dpi_estimation (void)
static void wayland_output_done (void *data, struct wl_output *output)
static void wayland_output_geometry (void *data, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height, int32_t subpixel, const char *make, const char *model, int32_t transform)
static void wayland_output_mode (void *data, struct wl_output *output, enum wl_output_mode flags, int32_t width, int32_t height, int32_t refresh)
static void wayland_output_scale (void *data, struct wl_output *output, int32_t scale)
static void wayland_registry_handle_global (void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version)
static void wayland_registry_handle_global_remove (void *data, struct wl_registry *registry, uint32_t name)
static void wayland_layer_shell_surface_configure (void *data, struct zwlr_layer_surface_v1 *surface, uint32_t serial, uint32_t width, uint32_t height)
static void wayland_surface_destroy (void)
static void wayland_layer_shell_surface_closed (void *data, struct zwlr_layer_surface_v1 *surface)
static gboolean wayland_error (gpointer user_data)
static gboolean wayland_display_setup (GMainLoop *main_loop, NkBindings *bindings)
gboolean display_get_surface_dimensions (int *width, int *height)
void display_set_surface_dimensions (int width, int height, int x_margin, int y_margin, int loc)
static void wayland_display_early_cleanup (void)
static void wayland_display_cleanup (void)
static void wayland_display_dump_monitor_layout (void)
static void wayland_display_startup_notification (RofiHelperExecuteContext *context, GSpawnChildSetupFunc *child_setup, gpointer *user_data)
static int wayland_display_monitor_active (workarea *mon)
static void wayland_display_set_input_focus (guint w)
static void wayland_display_revert_input_focus (void)
static guint wayland_display_scale (void)
static void wayland_get_clipboard_data (int cb_type, ClipboardCb callback, void *user_data)
static void wayland_set_fullscreen_mode (void)

Variables

static wayland_stuff wayland_
wayland_stuff * wayland = &wayland_
static const cairo_user_data_key_t wayland_cairo_surface_user_data
static const struct zwp_text_input_v3_listener text_input_listener
static const struct wl_buffer_listener wayland_buffer_listener
static const struct wl_surface_listener wayland_surface_interface
static const struct wl_callback_listener wayland_frame_wl_callback_listener
static const struct wl_keyboard_listener wayland_keyboard_listener
static const struct wl_callback_listener wayland_cursor_frame_wl_callback_listener
static const struct wl_pointer_listener wayland_pointer_listener
static const struct wl_touch_listener wayland_touch_listener
static const struct wl_data_offer_listener data_offer_listener
static const struct wl_data_device_listener data_device_listener
static const struct zwp_primary_selection_offer_v1_listener primary_selection_offer_listener
static const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener
static const struct wl_seat_listener wayland_seat_listener
static const struct wl_output_listener wayland_output_listener
static const struct wl_registry_listener wayland_registry_listener
static const struct zwlr_layer_surface_v1_listener wayland_layer_shell_surface_listener
static display_proxy display_
display_proxy *const wayland_proxy = &display_

Macro Definition Documentation

◆ CLIPBOARD_READ_INCREMENT

#define CLIPBOARD_READ_INCREMENT   1024

Definition at line 1163 of file display.c.

Referenced by clipboard_read_data(), and clipboard_read_glib_callback().

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "Wayland"

MIT/X11 License Modified (c) 2017 Morgane Glidic, (c) 2020-2025 lbonn, (c) 2025 lvitals

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 26 of file display.c.

◆ TOUCH_AXIS_LOCK

#define TOUCH_AXIS_LOCK   (2 * TOUCH_TAP_SLOP)

Definition at line 996 of file display.c.

Referenced by wayland_touch_motion().

◆ TOUCH_SCROLL_STEP

#define TOUCH_SCROLL_STEP   30

Definition at line 997 of file display.c.

Referenced by wayland_touch_scroll_step().

◆ TOUCH_TAP_SLOP

#define TOUCH_TAP_SLOP   8

Definition at line 995 of file display.c.

Referenced by wayland_touch_motion().

◆ wayland_output_get_dpi

#define wayland_output_get_dpi ( output,
scale,
dimension )
Value:
((output)->current.physical_##dimension > 0 && (scale) > 0 \
? round((double)(output)->current.dimension * 25.4 / (scale) / \
(output)->current.physical_##dimension) \
: 0)

Definition at line 72 of file display.c.

Referenced by wayland_display_dump_monitor_layout(), wayland_get_dpi_estimation(), and wayland_surface_protocol_enter().

◆ WHEEL_DETENT

#define WHEEL_DETENT   120

Typedef Documentation

◆ wayland_buffer_pool

Definition at line 82 of file display.c.

Function Documentation

◆ clipboard_handle_selection()

void clipboard_handle_selection ( enum clipboard_type cb_type,
void * offer )
static

Definition at line 1294 of file display.c.

References CLIPBOARD_DEFAULT, clipboard_handle_selection(), wayland_stuff::clipboards, clipboard_data::offer, and wayland.

Referenced by clipboard_handle_selection(), data_device_handle_selection(), and primary_selection_device_handle_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clipboard_read_data()

gboolean clipboard_read_data ( int fd,
ClipboardCb callback,
void * user_data )
static

◆ clipboard_read_glib_callback()

gboolean clipboard_read_glib_callback ( GIOChannel * channel,
GIOCondition condition,
gpointer opaque )
static

◆ data_device_handle_data_offer()

void data_device_handle_data_offer ( void * data,
struct wl_data_device * data_device,
struct wl_data_offer * offer )
static

Definition at line 1271 of file display.c.

References data_device_handle_data_offer(), and data_offer_listener.

Referenced by data_device_handle_data_offer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_device_handle_drop()

void data_device_handle_drop ( void * data,
struct wl_data_device * wl_data_device )
static

Definition at line 1291 of file display.c.

References data_device_handle_drop().

Referenced by data_device_handle_drop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_device_handle_enter()

void data_device_handle_enter ( void * data,
struct wl_data_device * wl_data_device,
uint32_t serial,
struct wl_surface * surface,
wl_fixed_t x,
wl_fixed_t y,
struct wl_data_offer * id )
static

Definition at line 1277 of file display.c.

References data_device_handle_enter().

Referenced by data_device_handle_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_device_handle_leave()

void data_device_handle_leave ( void * data,
struct wl_data_device * wl_data_device )
static

Definition at line 1283 of file display.c.

References data_device_handle_leave().

Referenced by data_device_handle_leave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_device_handle_motion()

void data_device_handle_motion ( void * data,
struct wl_data_device * wl_data_device,
uint32_t time,
wl_fixed_t x,
wl_fixed_t y )
static

Definition at line 1286 of file display.c.

References data_device_handle_motion().

Referenced by data_device_handle_motion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_device_handle_selection()

void data_device_handle_selection ( void * data,
struct wl_data_device * data_device,
struct wl_data_offer * offer )
static

Definition at line 1308 of file display.c.

References CLIPBOARD_DEFAULT, clipboard_handle_selection(), and data_device_handle_selection().

Referenced by data_device_handle_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_offer_handle_action()

void data_offer_handle_action ( void * data,
struct wl_data_offer * wl_data_offer,
uint32_t dnd_action )
static

Definition at line 1261 of file display.c.

References data_offer_handle_action().

Referenced by data_offer_handle_action().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_offer_handle_offer()

void data_offer_handle_offer ( void * data,
struct wl_data_offer * offer,
const char * mime_type )
static

Definition at line 1255 of file display.c.

References data_offer_handle_offer().

Referenced by data_offer_handle_offer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_offer_handle_source_actions()

void data_offer_handle_source_actions ( void * data,
struct wl_data_offer * wl_data_offer,
uint32_t source_actions )
static

Definition at line 1258 of file display.c.

References data_offer_handle_source_actions().

Referenced by data_offer_handle_source_actions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_buffer_pool_free()

void display_buffer_pool_free ( wayland_buffer_pool * self)

Definition at line 264 of file display.c.

References display_buffer_pool_free(), _display_buffer_pool::to_free, and wayland_buffer_cleanup().

Referenced by display_buffer_pool_free(), and wayland_rofi_view_pool_refresh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_buffer_pool_get_next_buffer()

cairo_surface_t * display_buffer_pool_get_next_buffer ( wayland_buffer_pool * pool)

◆ display_buffer_pool_new()

◆ display_get_surface_dimensions()

gboolean display_get_surface_dimensions ( int * width,
int * height )

◆ display_set_surface_dimensions()

void display_set_surface_dimensions ( int width,
int height,
int x_margin,
int y_margin,
int loc )

◆ display_surface_commit()

void display_surface_commit ( cairo_surface_t * surface)

◆ primary_selection_device_handle_data_offer()

void primary_selection_device_handle_data_offer ( void * data,
struct zwp_primary_selection_device_v1 * data_device,
struct zwp_primary_selection_offer_v1 * offer )
static

Definition at line 1333 of file display.c.

References primary_selection_device_handle_data_offer(), and primary_selection_offer_listener.

Referenced by primary_selection_device_handle_data_offer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primary_selection_device_handle_selection()

void primary_selection_device_handle_selection ( void * data,
struct zwp_primary_selection_device_v1 * data_device,
struct zwp_primary_selection_offer_v1 * offer )
static

Definition at line 1340 of file display.c.

References clipboard_handle_selection(), CLIPBOARD_PRIMARY, and primary_selection_device_handle_selection().

Referenced by primary_selection_device_handle_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primary_selection_handle_offer()

void primary_selection_handle_offer ( void * data,
struct zwp_primary_selection_offer_v1 * offer,
const char * mime_type )
static

Definition at line 1324 of file display.c.

References primary_selection_handle_offer().

Referenced by primary_selection_handle_offer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_cursor_type_to_wl_cursor()

struct wl_cursor * rofi_cursor_type_to_wl_cursor ( struct wl_cursor_theme * theme,
RofiCursorType type )
static

Definition at line 743 of file display.c.

References ROFI_CURSOR_POINTER, ROFI_CURSOR_TEXT, and rofi_cursor_type_to_wl_cursor().

Referenced by rofi_cursor_type_to_wl_cursor(), wayland_cursor_reload_theme(), and wayland_display_set_cursor_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_commit_string()

void text_input_commit_string ( void * data,
struct zwp_text_input_v3 * text_input,
const char * text )
static

Definition at line 1486 of file display.c.

References rofi_view_get_active(), rofi_view_handle_text(), rofi_view_maybe_update(), text_input_commit_string(), and update_cursor_rectangle().

Referenced by text_input_commit_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_delete_surrounding_text()

void text_input_delete_surrounding_text ( void * data,
struct zwp_text_input_v3 * text_input,
uint32_t before_length,
uint32_t after_length )
static

Definition at line 1502 of file display.c.

References text_input_delete_surrounding_text().

Referenced by text_input_delete_surrounding_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_done()

void text_input_done ( void * data,
struct zwp_text_input_v3 * text_input,
uint32_t serial )
static

Definition at line 1506 of file display.c.

References rofi_view_get_active(), rofi_view_maybe_update(), and text_input_done().

Referenced by text_input_done().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_enter()

void text_input_enter ( void * data,
struct zwp_text_input_v3 * text_input,
struct wl_surface * surface )
static

Definition at line 1459 of file display.c.

References text_input_enter(), and update_cursor_rectangle().

Referenced by text_input_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_leave()

void text_input_leave ( void * data,
struct zwp_text_input_v3 * text_input,
struct wl_surface * surface )
static

Definition at line 1468 of file display.c.

References text_input_leave().

Referenced by text_input_leave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ text_input_preedit_string()

void text_input_preedit_string ( void * data,
struct zwp_text_input_v3 * text_input,
const char * text,
int32_t cursor_begin,
int32_t cursor_end )
static

Definition at line 1474 of file display.c.

References rofi_view_get_active(), rofi_view_maybe_update(), text_input_preedit_string(), and update_cursor_rectangle().

Referenced by text_input_preedit_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_cursor_rectangle()

void update_cursor_rectangle ( struct zwp_text_input_v3 * text_input)
static

◆ wayland_buffer_cleanup()

void wayland_buffer_cleanup ( wayland_buffer_pool * self)
static

◆ wayland_buffer_release()

void wayland_buffer_release ( void * data,
struct wl_buffer * buffer )
static

Definition at line 178 of file display.c.

References wayland_buffer::buffer, wayland_stuff::buffer_count, _display_buffer_pool::buffers, wayland_buffer::released, wayland, wayland_buffer_cleanup(), and wayland_buffer_release().

Referenced by wayland_buffer_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_cursor_frame_callback()

void wayland_cursor_frame_callback ( void * data,
struct wl_callback * callback,
uint32_t time )
static

Definition at line 599 of file display.c.

References wayland_stuff::cursor, wayland_stuff::frame_cb, wayland_stuff::surface, wayland, wayland_cursor_frame_callback(), wayland_cursor_frame_wl_callback_listener, and wayland_cursor_set_image().

Referenced by wayland_cursor_frame_callback(), and wayland_cursor_update_for_seat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_cursor_reload_theme()

gboolean wayland_cursor_reload_theme ( guint scale)
static

Definition at line 1875 of file display.c.

References wayland_stuff::cursor, rofi_cursor_type_to_wl_cursor(), wayland_stuff::scale, wayland_stuff::shm, wayland, and wayland_cursor_reload_theme().

Referenced by wayland_cursor_reload_theme(), and wayland_pointer_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_cursor_set_image()

void wayland_cursor_set_image ( int i)
static

Definition at line 576 of file display.c.

References wayland_stuff::cursor, wayland_stuff::scale, wayland_stuff::surface, wayland, and wayland_cursor_set_image().

Referenced by wayland_cursor_frame_callback(), wayland_cursor_set_image(), and wayland_cursor_update_for_seat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_cursor_update_for_seat()

◆ wayland_display_cleanup()

void wayland_display_cleanup ( void )
static

Definition at line 2108 of file display.c.

References wayland_stuff::bindings_seat, wayland_stuff::display, wayland_stuff::main_loop_source, wayland_stuff::outputs, wayland_stuff::registry, wayland_stuff::seats, wayland_stuff::seats_by_name, wayland, and wayland_display_cleanup().

Referenced by wayland_display_cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_dump_monitor_layout()

void wayland_display_dump_monitor_layout ( void )
static

Definition at line 2122 of file display.c.

References color_bold, color_reset, wayland_output::current, wayland_output::global_name, wayland_output::name, wayland_stuff::outputs, wayland, wayland_display_dump_monitor_layout(), and wayland_output_get_dpi.

Referenced by wayland_display_dump_monitor_layout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_early_cleanup()

void wayland_display_early_cleanup ( void )
static

Definition at line 2099 of file display.c.

References wayland_stuff::display, wayland_stuff::main_loop_source, wayland, wayland_display_early_cleanup(), and wayland_surface_destroy().

Referenced by wayland_display_early_cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_late_setup()

◆ wayland_display_monitor_active()

int wayland_display_monitor_active ( workarea * mon)
static

Definition at line 2162 of file display.c.

References wayland_display_monitor_active().

Referenced by wayland_display_monitor_active().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_revert_input_focus()

void wayland_display_revert_input_focus ( void )
static

Definition at line 2169 of file display.c.

References wayland_display_revert_input_focus().

Referenced by wayland_display_revert_input_focus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_scale()

guint wayland_display_scale ( void )
static

Definition at line 2175 of file display.c.

References wayland_stuff::scale, wayland, and wayland_display_scale().

Referenced by wayland_display_scale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_set_cursor_type()

void wayland_display_set_cursor_type ( RofiCursorType type)

Definition at line 835 of file display.c.

References wayland_stuff::cursor, _wayland_seat::pointer, rofi_cursor_type_to_wl_cursor(), wayland_stuff::seats, wayland, wayland_cursor_update_for_seat(), and wayland_display_set_cursor_type().

Referenced by wayland_display_set_cursor_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_set_input_focus()

void wayland_display_set_input_focus ( guint w)
static

Definition at line 2167 of file display.c.

References wayland_display_set_input_focus().

Referenced by wayland_display_set_input_focus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_setup()

◆ wayland_display_startup_notification()

void wayland_display_startup_notification ( RofiHelperExecuteContext * context,
GSpawnChildSetupFunc * child_setup,
gpointer * user_data )
static

Definition at line 2158 of file display.c.

References wayland_display_startup_notification().

Referenced by wayland_display_startup_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_display_view_proxy()

const struct _view_proxy * wayland_display_view_proxy ( void )
static

Definition at line 2171 of file display.c.

References wayland_display_view_proxy(), and wayland_view_proxy.

Referenced by wayland_display_view_proxy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_error()

gboolean wayland_error ( gpointer user_data)
static

Definition at line 1870 of file display.c.

References wayland_stuff::main_loop, wayland, and wayland_error().

Referenced by wayland_display_setup(), and wayland_error().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_frame_callback()

void wayland_frame_callback ( void * data,
struct wl_callback * callback,
uint32_t time )
static

Definition at line 363 of file display.c.

References wayland_stuff::frame_cb, rofi_view_frame_callback(), wayland_stuff::surface, wayland, wayland_frame_callback(), and wayland_frame_wl_callback_listener.

Referenced by wayland_display_late_setup(), and wayland_frame_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_get_clipboard_data()

void wayland_get_clipboard_data ( int cb_type,
ClipboardCb callback,
void * user_data )
static

Definition at line 2177 of file display.c.

References CLIPBOARD_DEFAULT, clipboard_read_data(), wayland_stuff::clipboards, clipboard_data::offer, wayland, and wayland_get_clipboard_data().

Referenced by wayland_get_clipboard_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_get_dpi_estimation()

double wayland_get_dpi_estimation ( void )

Tries to guess the DPI.

Returns
an guess for the dpi, or -1 if no guess could be made.

Definition at line 1556 of file display.c.

References config, wayland_output::current, Settings::monitor, wayland_stuff::outputs, wayland, wayland_get_dpi_estimation(), wayland_output_by_name(), and wayland_output_get_dpi.

Referenced by wayland___create_window(), and wayland_get_dpi_estimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_key_repeat()

gboolean wayland_key_repeat ( void * data)
static

Definition at line 431 of file display.c.

References wayland_stuff::bindings_seat, _wayland_seat::repeat, rofi_view_get_active(), rofi_view_handle_text(), rofi_view_maybe_update(), wayland, and wayland_key_repeat().

Referenced by wayland_key_repeat(), and wayland_key_repeat_delay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_key_repeat_delay()

gboolean wayland_key_repeat_delay ( void * data)
static

Definition at line 457 of file display.c.

References wayland_stuff::bindings_seat, _wayland_seat::repeat, rofi_view_get_active(), rofi_view_handle_text(), rofi_view_maybe_update(), wayland, wayland_key_repeat(), and wayland_key_repeat_delay().

Referenced by wayland_key_repeat_delay(), and wayland_keyboard_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_enter()

void wayland_keyboard_enter ( void * data,
struct wl_keyboard * keyboard,
uint32_t serial,
struct wl_surface * surface,
struct wl_array * keys )
static

Definition at line 408 of file display.c.

References wayland_stuff::bindings_seat, wayland_stuff::last_seat, _wayland_seat::serial, wayland, and wayland_keyboard_enter().

Referenced by wayland_keyboard_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_key()

void wayland_keyboard_key ( void * data,
struct wl_keyboard * keyboard,
uint32_t serial,
uint32_t time,
uint32_t key,
enum wl_keyboard_key_state kstate )
static

Definition at line 489 of file display.c.

References wayland_stuff::bindings_seat, wayland_stuff::last_seat, _wayland_seat::repeat, rofi_view_get_active(), rofi_view_handle_text(), rofi_view_maybe_update(), _wayland_seat::serial, wayland, wayland_key_repeat_delay(), and wayland_keyboard_key().

Referenced by wayland_keyboard_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_keymap()

void wayland_keyboard_keymap ( void * data,
struct wl_keyboard * keyboard,
enum wl_keyboard_keymap_format format,
int32_t fd,
uint32_t size )
static

Definition at line 377 of file display.c.

References wayland_stuff::bindings_seat, wayland, and wayland_keyboard_keymap().

Referenced by wayland_keyboard_keymap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_leave()

void wayland_keyboard_leave ( void * data,
struct wl_keyboard * keyboard,
uint32_t serial,
struct wl_surface * surface )
static

Definition at line 424 of file display.c.

References wayland_keyboard_leave().

Referenced by wayland_keyboard_leave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_modifiers()

void wayland_keyboard_modifiers ( void * data,
struct wl_keyboard * keyboard,
uint32_t serial,
uint32_t mods_depressed,
uint32_t mods_latched,
uint32_t mods_locked,
uint32_t group )
static

Definition at line 534 of file display.c.

References wayland_stuff::bindings_seat, rofi_view_get_active(), rofi_view_maybe_update(), _wayland_seat::text_input, update_cursor_rectangle(), wayland, and wayland_keyboard_modifiers().

Referenced by wayland_keyboard_modifiers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_release()

void wayland_keyboard_release ( wayland_seat * self)
static

Definition at line 1142 of file display.c.

References _wayland_seat::keyboard, _wayland_seat::repeat, _wayland_seat::text_input, and wayland_keyboard_release().

Referenced by wayland_keyboard_release(), wayland_seat_capabilities(), and wayland_seat_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_keyboard_repeat_info()

void wayland_keyboard_repeat_info ( void * data,
struct wl_keyboard * keyboard,
int32_t rate,
int32_t delay )
static

Definition at line 552 of file display.c.

References _wayland_seat::repeat, and wayland_keyboard_repeat_info().

Referenced by wayland_keyboard_repeat_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_layer_shell_surface_closed()

void wayland_layer_shell_surface_closed ( void * data,
struct zwlr_layer_surface_v1 * surface )
static

Definition at line 1843 of file display.c.

References rofi_view_get_active(), rofi_view_pool_refresh(), rofi_view_set_size(), wayland_display_late_setup(), wayland_layer_shell_surface_closed(), and wayland_surface_destroy().

Referenced by wayland_layer_shell_surface_closed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_layer_shell_surface_configure()

void wayland_layer_shell_surface_configure ( void * data,
struct zwlr_layer_surface_v1 * surface,
uint32_t serial,
uint32_t width,
uint32_t height )
static

Definition at line 1823 of file display.c.

References wayland_stuff::layer_height, wayland_stuff::layer_width, wayland, and wayland_layer_shell_surface_configure().

Referenced by wayland_layer_shell_surface_configure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_by_name()

wayland_output * wayland_output_by_name ( const char * name)
static

Definition at line 1538 of file display.c.

References wayland_output::name, wayland_stuff::outputs, wayland, and wayland_output_by_name().

Referenced by wayland_display_late_setup(), wayland_get_dpi_estimation(), and wayland_output_by_name().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_done()

void wayland_output_done ( void * data,
struct wl_output * output )
static

Definition at line 1578 of file display.c.

References wayland_output::current, wayland_output::name, wayland_output::pending, and wayland_output_done().

Referenced by wayland_output_done().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_geometry()

void wayland_output_geometry ( void * data,
struct wl_output * output,
int32_t x,
int32_t y,
int32_t width,
int32_t height,
int32_t subpixel,
const char * make,
const char * model,
int32_t transform )
static

Definition at line 1592 of file display.c.

References wayland_output::pending, and wayland_output_geometry().

Referenced by wayland_output_geometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_mode()

void wayland_output_mode ( void * data,
struct wl_output * output,
enum wl_output_mode flags,
int32_t width,
int32_t height,
int32_t refresh )
static

Definition at line 1606 of file display.c.

References wayland_output::pending, and wayland_output_mode().

Referenced by wayland_output_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_release()

void wayland_output_release ( wayland_output * self)
static

Definition at line 1523 of file display.c.

References wayland_output::name, wayland_output::output, wayland_stuff::outputs, wayland, and wayland_output_release().

Referenced by wayland_output_release(), and wayland_registry_handle_global_remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_output_scale()

void wayland_output_scale ( void * data,
struct wl_output * output,
int32_t scale )
static

Definition at line 1616 of file display.c.

References wayland_output::pending, and wayland_output_scale().

Referenced by wayland_output_scale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_axis()

void wayland_pointer_axis ( void * data,
struct wl_pointer * pointer,
uint32_t time,
enum wl_pointer_axis axis,
wl_fixed_t value )
static

Definition at line 904 of file display.c.

References wayland_pointer_axis(), and _wayland_seat::wheel_continuous.

Referenced by wayland_pointer_axis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_axis_discrete()

void wayland_pointer_axis_discrete ( void * data,
struct wl_pointer * pointer,
enum wl_pointer_axis axis,
int32_t discrete )
static

Definition at line 936 of file display.c.

References wayland_pointer_axis_discrete(), _wayland_seat::wheel, and WHEEL_DETENT.

Referenced by wayland_pointer_axis_discrete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_axis_source()

void wayland_pointer_axis_source ( void * data,
struct wl_pointer * pointer,
enum wl_pointer_axis_source axis_source )
static

Definition at line 925 of file display.c.

References _wayland_seat::axis_source, and wayland_pointer_axis_source().

Referenced by wayland_pointer_axis_source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_axis_stop()

void wayland_pointer_axis_stop ( void * data,
struct wl_pointer * pointer,
uint32_t time,
enum wl_pointer_axis axis )
static

Definition at line 932 of file display.c.

References wayland_pointer_axis_stop().

Referenced by wayland_pointer_axis_stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_button()

void wayland_pointer_button ( void * data,
struct wl_pointer * pointer,
uint32_t serial,
uint32_t time,
uint32_t button,
enum wl_pointer_button_state state )
static

Definition at line 890 of file display.c.

References _wayland_seat::button, widget_button_event::button, wayland_stuff::last_seat, widget_button_event::pressed, _wayland_seat::serial, widget_button_event::time, wayland, and wayland_pointer_button().

Referenced by wayland_pointer_button().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_enter()

void wayland_pointer_enter ( void * data,
struct wl_pointer * pointer,
uint32_t serial,
struct wl_surface * surface,
wl_fixed_t x,
wl_fixed_t y )
static

Definition at line 813 of file display.c.

References _wayland_seat::pointer_serial, wayland_stuff::scale, wayland, wayland_cursor_reload_theme(), wayland_cursor_update_for_seat(), and wayland_pointer_enter().

Referenced by wayland_pointer_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_frame()

void wayland_pointer_frame ( void * data,
struct wl_pointer * pointer )
static

Definition at line 919 of file display.c.

References wayland_pointer_frame(), and wayland_pointer_send_events().

Referenced by wayland_pointer_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_leave()

void wayland_pointer_leave ( void * data,
struct wl_pointer * pointer,
uint32_t serial,
struct wl_surface * surface )
static

Definition at line 869 of file display.c.

References wayland_stuff::cursor, wayland_stuff::frame_cb, wayland, and wayland_pointer_leave().

Referenced by wayland_pointer_leave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_motion()

void wayland_pointer_motion ( void * data,
struct wl_pointer * pointer,
uint32_t time,
wl_fixed_t x,
wl_fixed_t y )
static

Definition at line 879 of file display.c.

References _wayland_seat::button, _wayland_seat::motion, widget_motion_event::time, wayland_pointer_motion(), widget_button_event::x, widget_motion_event::x, widget_button_event::y, and widget_motion_event::y.

Referenced by wayland_pointer_motion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_release()

void wayland_pointer_release ( wayland_seat * self)
static

Definition at line 1352 of file display.c.

References _wayland_seat::pointer, and wayland_pointer_release().

Referenced by wayland_pointer_release(), wayland_seat_capabilities(), and wayland_seat_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_pointer_send_events()

◆ wayland_registry_handle_global()

◆ wayland_registry_handle_global_remove()

◆ wayland_seat_capabilities()

◆ wayland_seat_name()

void wayland_seat_name ( void * data,
struct wl_seat * seat,
const char * name )
static

Definition at line 1443 of file display.c.

References _wayland_seat::name, wayland_stuff::seats_by_name, wayland, and wayland_seat_name().

Referenced by wayland_seat_name().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_seat_release()

void wayland_seat_release ( wayland_seat * self)
static

Definition at line 1380 of file display.c.

References _wayland_seat::seat, wayland_stuff::seats, wayland, wayland_keyboard_release(), wayland_pointer_release(), wayland_seat_release(), and wayland_touch_release().

Referenced by wayland_registry_handle_global_remove(), and wayland_seat_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_set_fullscreen_mode()

void wayland_set_fullscreen_mode ( void )
static

Definition at line 2201 of file display.c.

References wayland_stuff::display, rofi_view_pool_refresh(), wayland_stuff::surface, wayland, wayland_set_fullscreen_mode(), and wayland_stuff::wlr_surface.

Referenced by wayland_set_fullscreen_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_surface_destroy()

void wayland_surface_destroy ( void )
static

Definition at line 1831 of file display.c.

References wayland_stuff::surface, wayland, wayland_surface_destroy(), and wayland_stuff::wlr_surface.

Referenced by wayland_display_early_cleanup(), wayland_layer_shell_surface_closed(), and wayland_surface_destroy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_surface_protocol_enter()

void wayland_surface_protocol_enter ( void * data,
struct wl_surface * wl_surface,
struct wl_output * wl_output )
static

Definition at line 272 of file display.c.

References config, wayland_output::current, Settings::dpi, wayland_stuff::outputs, rofi_view_get_active(), rofi_view_pool_refresh(), rofi_view_set_size(), wayland_stuff::scale, wayland, wayland_output_get_dpi, and wayland_surface_protocol_enter().

Referenced by wayland_surface_protocol_enter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_surface_protocol_leave()

void wayland_surface_protocol_leave ( void * data,
struct wl_surface * wl_surface,
struct wl_output * wl_output )
static

Definition at line 303 of file display.c.

References wayland_surface_protocol_leave().

Referenced by wayland_surface_protocol_leave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_cancel()

void wayland_touch_cancel ( void * data,
struct wl_touch * touch )
static

Definition at line 1116 of file display.c.

References _wayland_seat::motion, _wayland_seat::touch_axis, _wayland_seat::touch_id, _wayland_seat::touch_scroll, WAYLAND_TOUCH_AXIS_NONE, wayland_touch_cancel(), widget_motion_event::x, and widget_motion_event::y.

Referenced by wayland_touch_cancel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_down()

void wayland_touch_down ( void * data,
struct wl_touch * touch,
uint32_t serial,
uint32_t time,
struct wl_surface * surface,
int32_t id,
wl_fixed_t x,
wl_fixed_t y )
static

◆ wayland_touch_frame()

void wayland_touch_frame ( void * data,
struct wl_touch * touch )
static

Definition at line 1109 of file display.c.

References wayland_pointer_send_events(), and wayland_touch_frame().

Referenced by wayland_touch_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_motion()

void wayland_touch_motion ( void * data,
struct wl_touch * touch,
uint32_t time,
int32_t id,
wl_fixed_t x,
wl_fixed_t y )
static

◆ wayland_touch_orientation()

void wayland_touch_orientation ( void * data,
struct wl_touch * touch,
int32_t id,
wl_fixed_t orientation )
static

Definition at line 1129 of file display.c.

References wayland_touch_orientation().

Referenced by wayland_touch_orientation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_release()

void wayland_touch_release ( wayland_seat * self)
static

Definition at line 1369 of file display.c.

References _wayland_seat::touch, _wayland_seat::touch_id, and wayland_touch_release().

Referenced by wayland_seat_capabilities(), wayland_seat_release(), and wayland_touch_release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_scroll_step()

gint wayland_touch_scroll_step ( RofiOrientation orientation)
static

Definition at line 999 of file display.c.

References config, rofi_view_get_active(), rofi_view_get_element_pitch(), TOUCH_SCROLL_STEP, Settings::touch_scroll_step, and wayland_touch_scroll_step().

Referenced by wayland_touch_motion(), and wayland_touch_scroll_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_shape()

void wayland_touch_shape ( void * data,
struct wl_touch * touch,
int32_t id,
wl_fixed_t major,
wl_fixed_t minor )
static

Definition at line 1126 of file display.c.

References wayland_touch_shape().

Referenced by wayland_touch_shape().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wayland_touch_up()

void wayland_touch_up ( void * data,
struct wl_touch * touch,
uint32_t serial,
uint32_t time,
int32_t id )
static

Variable Documentation

◆ data_device_listener

const struct wl_data_device_listener data_device_listener
static
Initial value:
= {
}
static void data_device_handle_drop(void *data, struct wl_data_device *wl_data_device)
Definition display.c:1291
static void data_device_handle_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer)
Definition display.c:1308
static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_device)
Definition display.c:1283
static void data_device_handle_motion(void *data, struct wl_data_device *wl_data_device, uint32_t time, wl_fixed_t x, wl_fixed_t y)
Definition display.c:1286
static void data_device_handle_data_offer(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer)
Definition display.c:1271
static void data_device_handle_enter(void *data, struct wl_data_device *wl_data_device, uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id)
Definition display.c:1277

Definition at line 1314 of file display.c.

Referenced by wayland_seat_capabilities().

◆ data_offer_listener

const struct wl_data_offer_listener data_offer_listener
static
Initial value:
= {
}
static void data_offer_handle_action(void *data, struct wl_data_offer *wl_data_offer, uint32_t dnd_action)
Definition display.c:1261
static void data_offer_handle_source_actions(void *data, struct wl_data_offer *wl_data_offer, uint32_t source_actions)
Definition display.c:1258
static void data_offer_handle_offer(void *data, struct wl_data_offer *offer, const char *mime_type)
Definition display.c:1255

Definition at line 1265 of file display.c.

Referenced by data_device_handle_data_offer().

◆ display_

display_proxy display_
static
Initial value:
= {
.dump_monitor_layout = wayland_display_dump_monitor_layout,
.startup_notification = wayland_display_startup_notification,
.monitor_active = wayland_display_monitor_active,
.set_input_focus = wayland_display_set_input_focus,
.revert_input_focus = wayland_display_revert_input_focus,
.get_clipboard_data = wayland_get_clipboard_data,
.set_fullscreen_mode = wayland_set_fullscreen_mode,
}
static void wayland_display_dump_monitor_layout(void)
Definition display.c:2122
static void wayland_display_set_input_focus(guint w)
Definition display.c:2167
static void wayland_display_revert_input_focus(void)
Definition display.c:2169
static void wayland_get_clipboard_data(int cb_type, ClipboardCb callback, void *user_data)
Definition display.c:2177
static void wayland_display_early_cleanup(void)
Definition display.c:2099
static void wayland_display_startup_notification(RofiHelperExecuteContext *context, GSpawnChildSetupFunc *child_setup, gpointer *user_data)
Definition display.c:2158
static guint wayland_display_scale(void)
Definition display.c:2175
static gboolean wayland_display_late_setup(void)
Definition display.c:1960
static void wayland_display_cleanup(void)
Definition display.c:2108
static gboolean wayland_display_setup(GMainLoop *main_loop, NkBindings *bindings)
Definition display.c:1912
static void wayland_set_fullscreen_mode(void)
Definition display.c:2201
static const struct _view_proxy * wayland_display_view_proxy(void)
Definition display.c:2171
static int wayland_display_monitor_active(workarea *mon)
Definition display.c:2162

Definition at line 2213 of file display.c.

◆ primary_selection_device_listener

const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener
static
Initial value:
= {
}
static void primary_selection_device_handle_selection(void *data, struct zwp_primary_selection_device_v1 *data_device, struct zwp_primary_selection_offer_v1 *offer)
Definition display.c:1340
static void primary_selection_device_handle_data_offer(void *data, struct zwp_primary_selection_device_v1 *data_device, struct zwp_primary_selection_offer_v1 *offer)
Definition display.c:1333

Definition at line 1347 of file display.c.

Referenced by wayland_seat_capabilities().

◆ primary_selection_offer_listener

const struct zwp_primary_selection_offer_v1_listener primary_selection_offer_listener
static
Initial value:
= {
}
static void primary_selection_handle_offer(void *data, struct zwp_primary_selection_offer_v1 *offer, const char *mime_type)
Definition display.c:1324

Definition at line 1329 of file display.c.

Referenced by primary_selection_device_handle_data_offer().

◆ text_input_listener

const struct zwp_text_input_v3_listener text_input_listener
static
Initial value:
= {
.enter = text_input_enter,
.leave = text_input_leave,
.preedit_string = text_input_preedit_string,
.commit_string = text_input_commit_string,
.delete_surrounding_text = text_input_delete_surrounding_text,
.done = text_input_done,
}
static void text_input_done(void *data, struct zwp_text_input_v3 *text_input, uint32_t serial)
Definition display.c:1506
static void text_input_enter(void *data, struct zwp_text_input_v3 *text_input, struct wl_surface *surface)
Definition display.c:1459
static void text_input_commit_string(void *data, struct zwp_text_input_v3 *text_input, const char *text)
Definition display.c:1486
static void text_input_preedit_string(void *data, struct zwp_text_input_v3 *text_input, const char *text, int32_t cursor_begin, int32_t cursor_end)
Definition display.c:1474
static void text_input_leave(void *data, struct zwp_text_input_v3 *text_input, struct wl_surface *surface)
Definition display.c:1468
static void text_input_delete_surrounding_text(void *data, struct zwp_text_input_v3 *text_input, uint32_t before_length, uint32_t after_length)
Definition display.c:1502

Definition at line 123 of file display.c.

Referenced by wayland_seat_capabilities().

◆ wayland

◆ wayland_

wayland_stuff wayland_
static

Definition at line 119 of file display.c.

◆ wayland_buffer_listener

const struct wl_buffer_listener wayland_buffer_listener
static
Initial value:
= {
static void wayland_buffer_release(void *data, struct wl_buffer *buffer)
Definition display.c:178

Definition at line 191 of file display.c.

Referenced by display_buffer_pool_new().

◆ wayland_cairo_surface_user_data

const cairo_user_data_key_t wayland_cairo_surface_user_data
static

Definition at line 121 of file display.c.

Referenced by display_buffer_pool_get_next_buffer(), and display_surface_commit().

◆ wayland_cursor_frame_wl_callback_listener

const struct wl_callback_listener wayland_cursor_frame_wl_callback_listener
static
Initial value:
= {
}
static void wayland_cursor_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
Definition display.c:599

Definition at line 595 of file display.c.

Referenced by wayland_cursor_frame_callback().

◆ wayland_frame_wl_callback_listener

const struct wl_callback_listener wayland_frame_wl_callback_listener
static
Initial value:
= {
}
static void wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
Definition display.c:363

Definition at line 315 of file display.c.

Referenced by wayland_frame_callback().

◆ wayland_keyboard_listener

const struct wl_keyboard_listener wayland_keyboard_listener
static
Initial value:
= {
}
static void wayland_keyboard_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t time, uint32_t key, enum wl_keyboard_key_state kstate)
Definition display.c:489
static void wayland_keyboard_modifiers(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)
Definition display.c:534
static void wayland_keyboard_keymap(void *data, struct wl_keyboard *keyboard, enum wl_keyboard_keymap_format format, int32_t fd, uint32_t size)
Definition display.c:377
static void wayland_keyboard_leave(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface)
Definition display.c:424
static void wayland_keyboard_repeat_info(void *data, struct wl_keyboard *keyboard, int32_t rate, int32_t delay)
Definition display.c:552
static void wayland_keyboard_enter(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
Definition display.c:408

Definition at line 565 of file display.c.

Referenced by wayland_seat_capabilities().

◆ wayland_layer_shell_surface_listener

const struct zwlr_layer_surface_v1_listener wayland_layer_shell_surface_listener
static
Initial value:
= {
}
static void wayland_layer_shell_surface_closed(void *data, struct zwlr_layer_surface_v1 *surface)
Definition display.c:1843
static void wayland_layer_shell_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, uint32_t serial, uint32_t width, uint32_t height)
Definition display.c:1823

Definition at line 1865 of file display.c.

Referenced by wayland_display_late_setup().

◆ wayland_output_listener

const struct wl_output_listener wayland_output_listener
static
Initial value:
= {
}
static void wayland_output_scale(void *data, struct wl_output *output, int32_t scale)
Definition display.c:1616
static void wayland_output_done(void *data, struct wl_output *output)
Definition display.c:1578
static void wayland_output_geometry(void *data, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height, int32_t subpixel, const char *make, const char *model, int32_t transform)
Definition display.c:1592
static void wayland_output_mode(void *data, struct wl_output *output, enum wl_output_mode flags, int32_t width, int32_t height, int32_t refresh)
Definition display.c:1606

Definition at line 1638 of file display.c.

Referenced by wayland_registry_handle_global().

◆ wayland_pointer_listener

const struct wl_pointer_listener wayland_pointer_listener
static
Initial value:
= {
}
static void wayland_pointer_axis(void *data, struct wl_pointer *pointer, uint32_t time, enum wl_pointer_axis axis, wl_fixed_t value)
Definition display.c:904
static void wayland_pointer_axis_stop(void *data, struct wl_pointer *pointer, uint32_t time, enum wl_pointer_axis axis)
Definition display.c:932
static void wayland_pointer_axis_discrete(void *data, struct wl_pointer *pointer, enum wl_pointer_axis axis, int32_t discrete)
Definition display.c:936
static void wayland_pointer_axis_source(void *data, struct wl_pointer *pointer, enum wl_pointer_axis_source axis_source)
Definition display.c:925
static void wayland_pointer_button(void *data, struct wl_pointer *pointer, uint32_t serial, uint32_t time, uint32_t button, enum wl_pointer_button_state state)
Definition display.c:890
static void wayland_pointer_frame(void *data, struct wl_pointer *pointer)
Definition display.c:919
static void wayland_pointer_leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface)
Definition display.c:869
static void wayland_pointer_enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y)
Definition display.c:813
static void wayland_pointer_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t x, wl_fixed_t y)
Definition display.c:879

Definition at line 971 of file display.c.

Referenced by wayland_seat_capabilities().

◆ wayland_proxy

display_proxy* const wayland_proxy = &display_

Definition at line 2230 of file display.c.

Referenced by main().

◆ wayland_registry_listener

const struct wl_registry_listener wayland_registry_listener
static
Initial value:
= {
}
static void wayland_registry_handle_global_remove(void *data, struct wl_registry *registry, uint32_t name)
Definition display.c:1736
static void wayland_registry_handle_global(void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version)
Definition display.c:1651

Definition at line 1818 of file display.c.

Referenced by wayland_display_setup().

◆ wayland_seat_listener

const struct wl_seat_listener wayland_seat_listener
static
Initial value:
= {
.capabilities = wayland_seat_capabilities,
}
static void wayland_seat_capabilities(void *data, struct wl_seat *seat, uint32_t capabilities)
Definition display.c:1392
static void wayland_seat_name(void *data, struct wl_seat *seat, const char *name)
Definition display.c:1443

Definition at line 1454 of file display.c.

Referenced by wayland_registry_handle_global().

◆ wayland_surface_interface

const struct wl_surface_listener wayland_surface_interface
static
Initial value:
= {
}
static void wayland_surface_protocol_enter(void *data, struct wl_surface *wl_surface, struct wl_output *wl_output)
Definition display.c:272
static void wayland_surface_protocol_leave(void *data, struct wl_surface *wl_surface, struct wl_output *wl_output)
Definition display.c:303

Definition at line 307 of file display.c.

Referenced by wayland_display_late_setup().

◆ wayland_touch_listener

const struct wl_touch_listener wayland_touch_listener
static
Initial value:
= {
.orientation = wayland_touch_orientation,
}
static void wayland_touch_frame(void *data, struct wl_touch *touch)
Definition display.c:1109
static void wayland_touch_shape(void *data, struct wl_touch *touch, int32_t id, wl_fixed_t major, wl_fixed_t minor)
Definition display.c:1126
static void wayland_touch_motion(void *data, struct wl_touch *touch, uint32_t time, int32_t id, wl_fixed_t x, wl_fixed_t y)
Definition display.c:1057
static void wayland_touch_orientation(void *data, struct wl_touch *touch, int32_t id, wl_fixed_t orientation)
Definition display.c:1129
static void wayland_touch_up(void *data, struct wl_touch *touch, uint32_t serial, uint32_t time, int32_t id)
Definition display.c:1031
static void wayland_touch_down(void *data, struct wl_touch *touch, uint32_t serial, uint32_t time, struct wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y)
Definition display.c:1008
static void wayland_touch_cancel(void *data, struct wl_touch *touch)
Definition display.c:1116

Definition at line 1132 of file display.c.

Referenced by wayland_seat_capabilities().