diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-29 15:27:28 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-29 15:27:28 -0500 |
commit | 82d464bb90af7fed57a36aacc2dce22994849bac (patch) | |
tree | 471b8eba3fb838115b163980b558cb151c6dbefc /wayland/window.c | |
parent | Only strip comments at the start of a line (diff) | |
download | sway-82d464bb90af7fed57a36aacc2dce22994849bac.tar.gz sway-82d464bb90af7fed57a36aacc2dce22994849bac.tar.zst sway-82d464bb90af7fed57a36aacc2dce22994849bac.zip |
Add text rendering support to wayland clients
Diffstat (limited to 'wayland/window.c')
-rw-r--r-- | wayland/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wayland/window.c b/wayland/window.c index 13d4c7b2..916e3b57 100644 --- a/wayland/window.c +++ b/wayland/window.c | |||
@@ -63,6 +63,7 @@ struct window *window_setup(struct registry *registry, uint32_t width, uint32_t | |||
63 | window->width = width; | 63 | window->width = width; |
64 | window->height = height; | 64 | window->height = height; |
65 | window->registry = registry; | 65 | window->registry = registry; |
66 | window->font = "monospace 10"; | ||
66 | 67 | ||
67 | window->surface = wl_compositor_create_surface(registry->compositor); | 68 | window->surface = wl_compositor_create_surface(registry->compositor); |
68 | if (shell_surface) { | 69 | if (shell_surface) { |
@@ -74,6 +75,8 @@ struct window *window_setup(struct registry *registry, uint32_t width, uint32_t | |||
74 | wl_pointer_add_listener(registry->pointer, &pointer_listener, window); | 75 | wl_pointer_add_listener(registry->pointer, &pointer_listener, window); |
75 | } | 76 | } |
76 | 77 | ||
78 | get_next_buffer(window); | ||
79 | |||
77 | window->cursor.cursor_theme = wl_cursor_theme_load("default", 32, registry->shm); // TODO: let you customize this | 80 | window->cursor.cursor_theme = wl_cursor_theme_load("default", 32, registry->shm); // TODO: let you customize this |
78 | window->cursor.cursor = wl_cursor_theme_get_cursor(window->cursor.cursor_theme, "left_ptr"); | 81 | window->cursor.cursor = wl_cursor_theme_get_cursor(window->cursor.cursor_theme, "left_ptr"); |
79 | window->cursor.surface = wl_compositor_create_surface(registry->compositor); | 82 | window->cursor.surface = wl_compositor_create_surface(registry->compositor); |
@@ -118,4 +121,5 @@ int window_render(struct window *window) { | |||
118 | } | 121 | } |
119 | 122 | ||
120 | void window_teardown(struct window *window) { | 123 | void window_teardown(struct window *window) { |
124 | // TODO | ||
121 | } | 125 | } |