aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-16 15:03:00 -0400
committerGitHub <noreply@github.com>2017-10-16 15:03:00 -0400
commitcebcda3ed5874f3c0e5f72b00a9cb4da479335dc (patch)
treeb80fa5141f3560bc79b00ba161dab1b04693dc97 /include
parent11c1b811db03394cee51cd5f51acf7646b7fdea1 (diff)
parent19784360f11796eb9cbd27ea6baa2ca0bc39a5f5 (diff)
Merge pull request #276 from acrisci/bug/fix-view-centering
bug: fix view centering
Diffstat (limited to 'include')
-rw-r--r--include/rootston/view.h6
-rw-r--r--include/wlr/types/wlr_output_layout.h6
-rw-r--r--include/wlr/types/wlr_xdg_shell_v6.h1
3 files changed, 8 insertions, 5 deletions
diff --git a/include/rootston/view.h b/include/rootston/view.h
index af087182..a4fb6f01 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -17,8 +17,6 @@ struct roots_wl_shell_surface {
struct wl_listener request_set_maximized;
struct wl_listener surface_commit;
-
- bool initialized;
};
struct roots_xdg_surface_v6 {
@@ -32,8 +30,6 @@ struct roots_xdg_surface_v6 {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_show_window_menu;
-
- bool initialized;
};
struct roots_xwayland_surface {
@@ -85,6 +81,6 @@ void view_activate(struct roots_view *view, bool active);
void view_resize(struct roots_view *view, uint32_t width, uint32_t height);
void view_close(struct roots_view *view);
bool view_center(struct roots_view *view);
-bool view_initialize(struct roots_view *view);
+void view_initialize(struct roots_view *view);
#endif
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h
index fe09106f..ea8dbcd2 100644
--- a/include/wlr/types/wlr_output_layout.h
+++ b/include/wlr/types/wlr_output_layout.h
@@ -84,4 +84,10 @@ struct wlr_box *wlr_output_layout_get_box(
void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
struct wlr_output *output);
+/**
+ * Get the output closest to the center of the layout extents.
+ */
+struct wlr_output *wlr_output_layout_get_center_output(
+ struct wlr_output_layout *layout);
+
#endif
diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h
index 48da6604..b0de41e2 100644
--- a/include/wlr/types/wlr_xdg_shell_v6.h
+++ b/include/wlr/types/wlr_xdg_shell_v6.h
@@ -106,6 +106,7 @@ struct wlr_xdg_surface_v6 {
struct wl_list popup_link;
bool configured;
+ bool added;
struct wl_event_source *configure_idle;
struct wl_list configure_list;