aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-23 22:54:52 +0100
committeremersion <contact@emersion.fr>2018-05-23 22:54:52 +0100
commitcd0fca2ebf81c252b3743c4474a5fdbcd3e2afad (patch)
tree595f1e80551b64de0d4e24f5721bae27acc195d9 /include/sway
parentb7ab7c0e66433aacaaccce08d6e40304e6f6593c (diff)
parent12a12878b9883c345dd73752a9cf714aeb245b8a (diff)
Merge branch 'master' into fix-swaylock-hotplugging
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/input/cursor.h3
-rw-r--r--include/sway/input/seat.h6
-rw-r--r--include/sway/tree/container.h15
-rw-r--r--include/sway/tree/view.h6
4 files changed, 28 insertions, 2 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 20c1c903..42c894a4 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -29,7 +29,8 @@ struct sway_cursor {
void sway_cursor_destroy(struct sway_cursor *cursor);
struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
-void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec);
+void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
+ bool allow_refocusing);
void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec,
uint32_t button, enum wlr_button_state state);
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index ff76841e..2e4da438 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -95,6 +95,12 @@ struct sway_container *seat_get_focus_inactive_view(struct sway_seat *seat,
struct sway_container *container);
/**
+ * Return the immediate child of container which was most recently focused.
+ */
+struct sway_container *seat_get_active_child(struct sway_seat *seat,
+ struct sway_container *container);
+
+/**
* Iterate over the focus-inactive children of the container calling the
* function on each.
*/
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index ec9e2385..493c70e2 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -11,6 +11,12 @@ extern struct sway_container root_container;
struct sway_view;
struct sway_seat;
+#define TITLEBAR_BORDER_THICKNESS 1
+
+// Padding includes titlebar border
+#define TITLEBAR_H_PADDING 3
+#define TITLEBAR_V_PADDING 4
+
/**
* Different kinds of containers.
*
@@ -98,6 +104,8 @@ struct sway_container {
// Passed the previous parent
struct wl_signal reparent;
} events;
+
+ struct wl_listener reparent;
};
struct sway_container *container_create(enum sway_container_type type);
@@ -160,7 +168,7 @@ struct sway_container *container_parent(struct sway_container *container,
* is a view and the view contains a surface at those coordinates.
*/
struct sway_container *container_at(struct sway_container *container,
- double lx, double ly, struct wlr_surface **surface,
+ double ox, double oy, struct wlr_surface **surface,
double *sx, double *sy);
/**
@@ -210,4 +218,9 @@ void container_calculate_title_height(struct sway_container *container);
void container_notify_child_title_changed(struct sway_container *container);
+/**
+ * Return the height of a regular title bar.
+ */
+size_t container_titlebar_height(void);
+
#endif
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 951912d0..0fb8f1b3 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -274,4 +274,10 @@ bool view_has_mark(struct sway_view *view, char *mark);
void view_update_marks_textures(struct sway_view *view);
+/**
+ * Returns true if there's a possibility the view may be rendered on screen.
+ * Intended for damage tracking.
+ */
+bool view_is_visible(struct sway_view *view);
+
#endif