Initial setup of window border rendering

Please don't complain to me about the performance of this
This commit is contained in:
Drew DeVault 2016-01-28 08:39:51 -05:00 committed by Mikkel Oscar Lyderik
parent c3a5e00b6e
commit 4611bba3db
4 changed files with 53 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include <ctype.h>
#include "handlers.h"
#include "render.h"
#include "log.h"
#include "layout.h"
#include "config.h"
@ -150,6 +151,10 @@ static void handle_output_post_render(wlc_handle output) {
ipc_get_pixels(output);
}
static void handle_view_pre_render(wlc_handle view) {
render_view_borders(view);
}
static void handle_output_resolution_change(wlc_handle output, const struct wlc_size *from, const struct wlc_size *to) {
sway_log(L_DEBUG, "Output %u resolution changed to %d x %d", (unsigned int)output, to->w, to->h);
swayc_t *c = swayc_by_handle(output);
@ -716,6 +721,7 @@ void register_wlc_handlers() {
wlc_set_view_created_cb(handle_view_created);
wlc_set_view_destroyed_cb(handle_view_destroyed);
wlc_set_view_focus_cb(handle_view_focus);
wlc_set_view_render_pre_cb(handle_view_pre_render);
wlc_set_view_request_geometry_cb(handle_view_geometry_request);
wlc_set_view_request_state_cb(handle_view_state_request);
wlc_set_keyboard_key_cb(handle_key);