testWM: visible background + auto-spawn one terminal on startup
This commit is contained in:
@@ -239,6 +239,11 @@ static void on_new_output(void* data) {
|
|||||||
S->outputs.push_back(so);
|
S->outputs.push_back(so);
|
||||||
S->layout.add_auto_output(o);
|
S->layout.add_auto_output(o);
|
||||||
wl_event_source_timer_update(S->scheduler_source, 0);
|
wl_event_source_timer_update(S->scheduler_source, 0);
|
||||||
|
static bool spawned = false;
|
||||||
|
if (!spawned) {
|
||||||
|
spawned = true;
|
||||||
|
spawn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_new_input(void* data) {
|
static void on_new_input(void* data) {
|
||||||
@@ -313,6 +318,10 @@ int main() {
|
|||||||
S->cursor.on_axis(on_axis);
|
S->cursor.on_axis(on_axis);
|
||||||
S->cursor.on_frame(on_frame);
|
S->cursor.on_frame(on_frame);
|
||||||
|
|
||||||
|
float bg_color[4] = {0.08f, 0.08f, 0.12f, 1.0f};
|
||||||
|
wlr::Rect bg(wlr_scene_rect_create(S->scene.root(), 4096, 4096, bg_color));
|
||||||
|
(void)bg;
|
||||||
|
|
||||||
S->backend.on_new_output(on_new_output);
|
S->backend.on_new_output(on_new_output);
|
||||||
S->backend.on_new_input(on_new_input);
|
S->backend.on_new_input(on_new_input);
|
||||||
S->xdg_shell.on_new_toplevel(on_new_toplevel);
|
S->xdg_shell.on_new_toplevel(on_new_toplevel);
|
||||||
|
|||||||
Reference in New Issue
Block a user