aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-07-14 18:57:37 -0400
committerGitHub <noreply@github.com>2016-07-14 18:57:37 -0400
commit6abbe04e7590f3bfba13351eb87ada70ac3d506e (patch)
treef7c64d6e9d082bd080960c42e21e54edf01839de /include
parent1e95191900d1f16b4d195f2d05f1eb7cb1f62ad5 (diff)
parent8a232c8cfd60c1469ceaaa911f31a6d75e8ad851 (diff)
Merge pull request #743 from deklov/panel-as-shell-03
Set panels/backgrounds' geometries correctly and don't render them ex…
Diffstat (limited to 'include')
-rw-r--r--include/bar/bar.h3
-rw-r--r--include/bar/ipc.h6
-rw-r--r--include/bar/render.h5
-rw-r--r--include/client/window.h6
-rw-r--r--include/extensions.h4
5 files changed, 19 insertions, 5 deletions
diff --git a/include/bar/bar.h b/include/bar/bar.h
index c20efc55..a3c511d9 100644
--- a/include/bar/bar.h
+++ b/include/bar/bar.h
@@ -32,6 +32,9 @@ struct workspace {
bool urgent;
};
+/** Global bar state */
+extern struct bar swaybar;
+
/**
* Setup bar.
*/
diff --git a/include/bar/ipc.h b/include/bar/ipc.h
index 741c067b..c11931d0 100644
--- a/include/bar/ipc.h
+++ b/include/bar/ipc.h
@@ -13,5 +13,11 @@ void ipc_bar_init(struct bar *bar, const char *bar_id);
*/
bool handle_ipc_event(struct bar *bar);
+
+/**
+ * Send workspace command to sway
+ */
+void ipc_send_workspace_command(const char *workspace_name);
+
#endif /* _SWAYBAR_IPC_H */
diff --git a/include/bar/render.h b/include/bar/render.h
index 931a1cdd..114f43f4 100644
--- a/include/bar/render.h
+++ b/include/bar/render.h
@@ -14,4 +14,9 @@ void render(struct output *output, struct config *config, struct status_line *li
*/
void set_window_height(struct window *window, int height);
+/**
+ * Compute the size of a workspace name
+ */
+void workspace_button_size(struct window *window, const char *workspace_name, int *width, int *height);
+
#endif /* _SWAYBAR_RENDER_H */
diff --git a/include/client/window.h b/include/client/window.h
index 7be4fff3..55a12225 100644
--- a/include/client/window.h
+++ b/include/client/window.h
@@ -28,10 +28,10 @@ struct cursor {
};
struct pointer_input {
- wl_fixed_t last_x;
- wl_fixed_t last_y;
+ int last_x;
+ int last_y;
- void (*notify)(struct window *window, wl_fixed_t x, wl_fixed_t y, uint32_t button);
+ void (*notify)(struct window *window, int x, int y, uint32_t button);
};
struct window {
diff --git a/include/extensions.h b/include/extensions.h
index 7c508b5e..d26e95c1 100644
--- a/include/extensions.h
+++ b/include/extensions.h
@@ -11,8 +11,6 @@ struct background_config {
wlc_resource surface;
// we need the wl_resource of the surface in the destructor
struct wl_resource *wl_surface_res;
- // used to determine if client is a background
- struct wl_client *client;
};
struct panel_config {
@@ -25,6 +23,8 @@ struct panel_config {
enum desktop_shell_panel_position panel_position;
// used to determine if client is a panel
struct wl_client *client;
+ // wlc handle for this panel's surface, not set until panel is created
+ wlc_handle handle;
};
struct desktop_shell_state {