summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stringop.h2
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h11
-rw-r--r--include/sway/criteria.h2
-rw-r--r--include/sway/tree/view.h6
-rw-r--r--include/sway/xwayland.h1
6 files changed, 22 insertions, 1 deletions
diff --git a/include/stringop.h b/include/stringop.h
index e7f58011..01bbdaa9 100644
--- a/include/stringop.h
+++ b/include/stringop.h
@@ -46,4 +46,6 @@ char *cmdsep(char **stringp, const char *delim);
46// Split string into 2 by delim, handle quotes 46// Split string into 2 by delim, handle quotes
47char *argsep(char **stringp, const char *delim); 47char *argsep(char **stringp, const char *delim);
48 48
49const char *strcasestr(const char *haystack, const char *needle);
50
49#endif 51#endif
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 8e91c158..b0b5ed0f 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -117,6 +117,7 @@ sway_cmd cmd_floating_modifier;
117sway_cmd cmd_floating_scroll; 117sway_cmd cmd_floating_scroll;
118sway_cmd cmd_focus; 118sway_cmd cmd_focus;
119sway_cmd cmd_focus_follows_mouse; 119sway_cmd cmd_focus_follows_mouse;
120sway_cmd cmd_focus_on_window_activation;
120sway_cmd cmd_focus_wrapping; 121sway_cmd cmd_focus_wrapping;
121sway_cmd cmd_font; 122sway_cmd cmd_font;
122sway_cmd cmd_for_window; 123sway_cmd cmd_for_window;
diff --git a/include/sway/config.h b/include/sway/config.h
index 18d10faa..4ee8c3c2 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -58,6 +58,16 @@ struct sway_mouse_binding {
58}; 58};
59 59
60/** 60/**
61 * Focus on window activation.
62 */
63enum sway_fowa {
64 FOWA_SMART,
65 FOWA_URGENT,
66 FOWA_FOCUS,
67 FOWA_NONE,
68};
69
70/**
61 * A "mode" of keybindings created via the `mode` command. 71 * A "mode" of keybindings created via the `mode` command.
62 */ 72 */
63struct sway_mode { 73struct sway_mode {
@@ -340,6 +350,7 @@ struct sway_config {
340 size_t font_height; 350 size_t font_height;
341 bool pango_markup; 351 bool pango_markup;
342 size_t urgent_timeout; 352 size_t urgent_timeout;
353 enum sway_fowa focus_on_window_activation;
343 354
344 // Flags 355 // Flags
345 bool focus_follows_mouse; 356 bool focus_follows_mouse;
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
index 7a1e547b..af12ffd7 100644
--- a/include/sway/criteria.h
+++ b/include/sway/criteria.h
@@ -31,7 +31,7 @@ struct criteria {
31 uint32_t id; // X11 window ID 31 uint32_t id; // X11 window ID
32#endif 32#endif
33 pcre *window_role; 33 pcre *window_role;
34 uint32_t window_type; 34 enum atom_name window_type;
35 bool floating; 35 bool floating;
36 bool tiling; 36 bool tiling;
37 char urgent; // 'l' for latest or 'o' for oldest 37 char urgent; // 'l' for latest or 'o' for oldest
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index f73ce571..382ab6b9 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -167,6 +167,7 @@ struct sway_xwayland_view {
167 struct wl_listener request_maximize; 167 struct wl_listener request_maximize;
168 struct wl_listener request_configure; 168 struct wl_listener request_configure;
169 struct wl_listener request_fullscreen; 169 struct wl_listener request_fullscreen;
170 struct wl_listener request_activate;
170 struct wl_listener set_title; 171 struct wl_listener set_title;
171 struct wl_listener set_class; 172 struct wl_listener set_class;
172 struct wl_listener set_window_type; 173 struct wl_listener set_window_type;
@@ -259,6 +260,11 @@ void view_autoconfigure(struct sway_view *view);
259 260
260void view_set_activated(struct sway_view *view, bool activated); 261void view_set_activated(struct sway_view *view, bool activated);
261 262
263/**
264 * Called when the view requests to be focused.
265 */
266void view_request_activate(struct sway_view *view);
267
262void view_set_tiled(struct sway_view *view, bool tiled); 268void view_set_tiled(struct sway_view *view, bool tiled);
263 269
264void view_close(struct sway_view *view); 270void view_close(struct sway_view *view);
diff --git a/include/sway/xwayland.h b/include/sway/xwayland.h
index 78d1053b..121edad3 100644
--- a/include/sway/xwayland.h
+++ b/include/sway/xwayland.h
@@ -5,6 +5,7 @@
5#include <xcb/xproto.h> 5#include <xcb/xproto.h>
6 6
7enum atom_name { 7enum atom_name {
8 NET_WM_WINDOW_TYPE_NORMAL,
8 NET_WM_WINDOW_TYPE_DIALOG, 9 NET_WM_WINDOW_TYPE_DIALOG,
9 NET_WM_WINDOW_TYPE_UTILITY, 10 NET_WM_WINDOW_TYPE_UTILITY,
10 NET_WM_WINDOW_TYPE_TOOLBAR, 11 NET_WM_WINDOW_TYPE_TOOLBAR,