diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-08 12:51:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 12:51:42 -0400 |
commit | 8dcf3bfdf786ceb2614d4cf572ef6747cd4bb94c (patch) | |
tree | 762bde8fa6fca8e1faa342b7965ba7e44b61ab99 /include | |
parent | 9e1ff2dce9eded87673c8cd7eeb7e31a421f7a22 (diff) | |
parent | b72da6cc44cf19688686383065557425d55ae9ed (diff) |
Merge pull request #239 from emersion/center-views
Center views in rootston
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/input.h | 3 | ||||
-rw-r--r-- | include/rootston/view.h | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/rootston/input.h b/include/rootston/input.h index e20446ea..9caf66c0 100644 --- a/include/rootston/input.h +++ b/include/rootston/input.h @@ -132,4 +132,7 @@ void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor, void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor, struct roots_view *view, uint32_t edges); +void set_view_focus(struct roots_input *input, struct roots_desktop *desktop, + struct roots_view *view); + #endif diff --git a/include/rootston/view.h b/include/rootston/view.h index 64aad45e..ccc934d4 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -1,5 +1,6 @@ #ifndef _ROOTSTON_VIEW_H #define _ROOTSTON_VIEW_H + #include <stdbool.h> #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_surface.h> @@ -14,17 +15,25 @@ struct roots_wl_shell_surface { struct wl_listener request_resize; struct wl_listener request_set_fullscreen; struct wl_listener request_set_maximized; + + struct wl_listener surface_commit; + + bool initialized; }; struct roots_xdg_surface_v6 { struct roots_view *view; + // TODO: Maybe destroy listener should go in roots_view + struct wl_listener commit; struct wl_listener destroy; struct wl_listener ping_timeout; struct wl_listener request_minimize; struct wl_listener request_move; struct wl_listener request_resize; struct wl_listener request_show_window_menu; + + bool initialized; }; struct roots_xwayland_surface { @@ -73,5 +82,7 @@ void view_get_input_bounds(struct roots_view *view, struct wlr_box *box); 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); #endif |