Merge branch 'master' into mouseemu

This commit is contained in:
Simon Long 2024-10-20 11:56:14 +01:00 committed by GitHub
commit 06129fe1ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
178 changed files with 10958 additions and 2691 deletions

View file

@ -322,6 +322,16 @@ static struct mouse_combos {
.button = "Left",
.event = "Click",
.action = "ToggleMaximize",
}, {
.context = "Shade",
.button = "Left",
.event = "Click",
.action = "ToggleShade",
}, {
.context = "AllDesktops",
.button = "Left",
.event = "Click",
.action = "ToggleOmnipresent",
}, {
.context = "Maximize",
.button = "Right",
@ -366,6 +376,32 @@ static struct mouse_combos {
.name = "atCursor",
.value = "no",
},
}, {
.context = "Icon",
.button = "Left",
.event = "Click",
.action = "ShowMenu",
.attributes[0] = {
.name = "menu",
.value = "client-menu",
},
.attributes[1] = {
.name = "atCursor",
.value = "no",
},
}, {
.context = "Icon",
.button = "Right",
.event = "Click",
.action = "ShowMenu",
.attributes[0] = {
.name = "menu",
.value = "client-menu",
},
.attributes[1] = {
.name = "atCursor",
.value = "no",
},
}, {
.context = "Root",
.button = "Left",

View file

@ -18,6 +18,7 @@ struct keybind {
xkb_keycode_t keycodes[MAX_KEYCODES];
size_t keycodes_len;
int keycodes_layout;
bool allow_when_locked;
struct wl_list actions; /* struct action.link */
struct wl_list link; /* struct rcxml.keybinds */
bool on_release;

View file

@ -31,6 +31,7 @@ struct libinput_category {
int click_method; /* -1 or libinput_config_click_method */
int send_events_mode; /* -1 or libinput_config_send_events_mode */
bool have_calibration_matrix;
double scroll_factor;
float calibration_matrix[6];
};

View file

@ -11,15 +11,18 @@
#include "common/font.h"
#include "config/touch.h"
#include "config/tablet.h"
#include "config/tablet-tool.h"
#include "config/libinput.h"
#include "resize-indicator.h"
#include "ssd.h"
#include "theme.h"
enum view_placement_policy {
LAB_PLACE_INVALID = 0,
LAB_PLACE_CENTER,
LAB_PLACE_CURSOR,
LAB_PLACE_AUTOMATIC
LAB_PLACE_AUTOMATIC,
LAB_PLACE_CASCADE,
};
enum adaptive_sync_mode {
@ -28,6 +31,13 @@ enum adaptive_sync_mode {
LAB_ADAPTIVE_SYNC_FULLSCREEN,
};
enum tearing_mode {
LAB_TEARING_DISABLED = 0,
LAB_TEARING_ENABLED,
LAB_TEARING_FULLSCREEN,
LAB_TEARING_FULLSCREEN_FORCED,
};
enum tiling_events_mode {
LAB_TILING_EVENTS_NEVER = 0,
LAB_TILING_EVENTS_REGION = 1 << 0,
@ -36,6 +46,11 @@ enum tiling_events_mode {
(LAB_TILING_EVENTS_REGION | LAB_TILING_EVENTS_EDGE),
};
struct title_button {
enum ssd_part_type type;
struct wl_list link;
};
struct usable_area_override {
struct border margin;
char *output;
@ -52,9 +67,12 @@ struct rcxml {
bool xdg_shell_server_side_deco;
int gap;
enum adaptive_sync_mode adaptive_sync;
bool allow_tearing;
enum tearing_mode allow_tearing;
bool reuse_output_mode;
enum view_placement_policy placement_policy;
bool xwayland_persistence;
int placement_cascade_offset_x;
int placement_cascade_offset_y;
/* focus */
bool focus_follow_mouse;
@ -63,11 +81,17 @@ struct rcxml {
/* theme */
char *theme_name;
char *icon_theme_name;
struct wl_list title_buttons_left;
struct wl_list title_buttons_right;
int corner_radius;
bool show_title;
bool title_layout_loaded;
bool ssd_keep_border;
bool shadows_enabled;
struct font font_activewindow;
struct font font_inactivewindow;
struct font font_menuheader;
struct font font_menuitem;
struct font font_osd;
@ -87,7 +111,6 @@ struct rcxml {
/* mouse */
long doubleclick_time; /* in ms */
struct wl_list mousebinds; /* struct mousebind.link */
double scroll_factor;
/* touch tablet */
struct wl_list touch_configs;
@ -101,6 +124,10 @@ struct rcxml {
uint16_t button_map_count;
struct button_map_entry button_map[BUTTON_MAP_MAX];
} tablet;
struct tablet_tool_config {
enum motion motion;
double relative_motion_sensitivity;
} tablet_tool;
/* libinput */
struct wl_list libinput_categories;
@ -108,6 +135,8 @@ struct rcxml {
/* resistance */
int screen_edge_strength;
int window_edge_strength;
int unsnap_threshold;
int unmaximize_threshold;
/* window snapping */
int snap_edge_range;

View file

@ -4,6 +4,12 @@
struct server;
/**
* session_run_script - run a named session script (or, in merge-config mode,
* all named session scripts) from the XDG path.
*/
void session_run_script(const char *script);
/**
* session_environment_init - set environment variables based on <key>=<value>
* pairs in `${XDG_CONFIG_DIRS:-/etc/xdg}/labwc/environment` with user override

View file

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_TABLET_TOOL_CONFIG_H
#define LABWC_TABLET_TOOL_CONFIG_H
#include <stdint.h>
enum motion {
LAB_TABLET_MOTION_ABSOLUTE = 0,
LAB_TABLET_MOTION_RELATIVE,
};
enum motion tablet_parse_motion(const char *name);
#endif /* LABWC_TABLET_TOOL_CONFIG_H */