summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-03-17 08:33:11 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-03-17 08:33:11 -0400
commit93109674d0e3bc918fd715217b696c0b5ec2312b (patch)
treecf97416b118c61456109c05eed820702b7d03f09
parentMerge pull request #510 from mikkeloscar/render-output-at-launch (diff)
parentSchedule render when adding bg and panel. (diff)
downloadsway-93109674d0e3bc918fd715217b696c0b5ec2312b.tar.gz
sway-93109674d0e3bc918fd715217b696c0b5ec2312b.tar.zst
sway-93109674d0e3bc918fd715217b696c0b5ec2312b.zip
Merge pull request #512 from mikkeloscar/bg-panel-render
Schedule render when adding bg and panel
-rw-r--r--sway/extensions.c3
-rw-r--r--sway/handlers.c7
2 files changed, 3 insertions, 7 deletions
diff --git a/sway/extensions.c b/sway/extensions.c
index 2d17292a..b3984595 100644
--- a/sway/extensions.c
+++ b/sway/extensions.c
@@ -1,6 +1,7 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <wlc/wlc.h> 2#include <wlc/wlc.h>
3#include <wlc/wlc-wayland.h> 3#include <wlc/wlc-wayland.h>
4#include <wlc/wlc-render.h>
4#include "wayland-desktop-shell-server-protocol.h" 5#include "wayland-desktop-shell-server-protocol.h"
5#include "wayland-swaylock-server-protocol.h" 6#include "wayland-swaylock-server-protocol.h"
6#include "layout.h" 7#include "layout.h"
@@ -77,6 +78,7 @@ static void set_background(struct wl_client *client, struct wl_resource *resourc
77 config->wl_surface_res = surface; 78 config->wl_surface_res = surface;
78 list_add(desktop_shell.backgrounds, config); 79 list_add(desktop_shell.backgrounds, config);
79 wl_resource_set_destructor(surface, background_surface_destructor); 80 wl_resource_set_destructor(surface, background_surface_destructor);
81 wlc_output_schedule_render(config->output);
80} 82}
81 83
82static void set_panel(struct wl_client *client, struct wl_resource *resource, 84static void set_panel(struct wl_client *client, struct wl_resource *resource,
@@ -93,6 +95,7 @@ static void set_panel(struct wl_client *client, struct wl_resource *resource,
93 wl_resource_set_destructor(surface, panel_surface_destructor); 95 wl_resource_set_destructor(surface, panel_surface_destructor);
94 desktop_shell.panel_size = *wlc_surface_get_size(config->surface); 96 desktop_shell.panel_size = *wlc_surface_get_size(config->surface);
95 arrange_windows(&root_container, -1, -1); 97 arrange_windows(&root_container, -1, -1);
98 wlc_output_schedule_render(config->output);
96} 99}
97 100
98static void desktop_set_lock_surface(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface) { 101static void desktop_set_lock_surface(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface) {
diff --git a/sway/handlers.c b/sway/handlers.c
index ba0c832e..69f325eb 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -680,13 +680,6 @@ static void handle_wlc_ready(void) {
680 free(line); 680 free(line);
681 list_del(config->cmd_queue, 0); 681 list_del(config->cmd_queue, 0);
682 } 682 }
683
684 // render all outputs
685 int i;
686 for (i = 0; i < root_container.children->length; ++i) {
687 swayc_t *output = root_container.children->items[i];
688 wlc_output_schedule_render(output->handle);
689 }
690} 683}
691 684
692struct wlc_interface interface = { 685struct wlc_interface interface = {