diff options
Diffstat (limited to 'swt.c')
| -rw-r--r-- | swt.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -275,6 +275,9 @@ draw_glyph(Glyph g, int x, int y) void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) { + if (IS_SET(MODE_HIDE)) + return; + draw_rect( win.canvas, borderpx + ox * win.fontcache->box.width, @@ -431,6 +434,7 @@ void wximspot(int, int) {} void buffer_release(void *data, struct wl_buffer *buffer) { + fprintf(stderr, "BUFFER RELEASE\n"); wl_buffer_destroy(buffer); } @@ -458,7 +462,7 @@ surface_configure(void *data, struct xdg_surface *surface, uint32_t serial) int first_configure = win.canvas == 0; xdg_surface_ack_configure(surface, serial); - if (first_configure) + if (first_configure); commit_surface(); } @@ -475,11 +479,12 @@ toplevel_configure(void *data, struct xdg_toplevel *toplevel, int32_t width, int win.height = height; } - if (win.canvas != 0) { - free_drw(win.canvas); + if (win.canvas == 0) { + win.canvas = create_drw(client.shm, win.width, win.height); + } else { + resize_drw(win.canvas, width, height); } - win.canvas = create_drw(client.shm, win.width, win.height); draw_frame(); win.tty.width = (win.width - 2 * borderpx) / win.fontcache->box.width; win.tty.height = (win.height - 2 * borderpx) / win.fontcache->box.height; @@ -521,6 +526,7 @@ registry_global(void *data, struct wl_registry *registry, uint32_t name, const c void registry_global_remove(void *data, struct wl_registry *registry, uint32_t name) { + fprintf(stderr, "REMOVE %i\n", name); /* TODO: Check if this is necessary */ } @@ -910,12 +916,14 @@ run() if (wl_display_flush(client.display) < 0) { if (errno == EAGAIN) continue; + die("wayland error:"); break; } if (poll(fds, sizeof(fds) / sizeof(*fds), -1) < 0) { if (errno == EAGAIN) continue; + die("poll error:"); break; } |