aboutsummaryrefslogtreecommitdiff
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);
// Split string into 2 by delim, handle quotes
char *argsep(char **stringp, const char *delim);
+const char *strcasestr(const char *haystack, const char *needle);
+
#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;
sway_cmd cmd_floating_scroll;
sway_cmd cmd_focus;
sway_cmd cmd_focus_follows_mouse;
+sway_cmd cmd_focus_on_window_activation;
sway_cmd cmd_focus_wrapping;
sway_cmd cmd_font;
sway_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 {
};
/**
+ * Focus on window activation.
+ */
+enum sway_fowa {
+ FOWA_SMART,
+ FOWA_URGENT,
+ FOWA_FOCUS,
+ FOWA_NONE,
+};
+
+/**
* A "mode" of keybindings created via the `mode` command.
*/
struct sway_mode {
@@ -340,6 +350,7 @@ struct sway_config {
size_t font_height;
bool pango_markup;
size_t urgent_timeout;
+ enum sway_fowa focus_on_window_activation;
// Flags
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 {
uint32_t id; // X11 window ID
#endif
pcre *window_role;
- uint32_t window_type;
+ enum atom_name window_type;
bool floating;
bool tiling;
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 {
struct wl_listener request_maximize;
struct wl_listener request_configure;
struct wl_listener request_fullscreen;
+ struct wl_listener request_activate;
struct wl_listener set_title;
struct wl_listener set_class;
struct wl_listener set_window_type;
@@ -259,6 +260,11 @@ void view_autoconfigure(struct sway_view *view);
void view_set_activated(struct sway_view *view, bool activated);
+/**
+ * Called when the view requests to be focused.
+ */
+void view_request_activate(struct sway_view *view);
+
void view_set_tiled(struct sway_view *view, bool tiled);
void 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 @@
#include <xcb/xproto.h>
enum atom_name {
+ NET_WM_WINDOW_TYPE_NORMAL,
NET_WM_WINDOW_TYPE_DIALOG,
NET_WM_WINDOW_TYPE_UTILITY,
NET_WM_WINDOW_TYPE_TOOLBAR,