ref: 8b40d63248fa6b3895203964adaf95d600956113
parent: 4024ba789b30f0586f1caf01653d663570e3c001
author: aap <[email protected]>
date: Mon Jan 30 14:56:42 EST 2023
focus to new windows
--- a/main.c
+++ b/main.c
@@ -333,10 +333,10 @@
if(w){
wresize(w, r);
wraise(w);
+ wfocus(w);
}else{
- w = new(r);
+ new(r);
}
- wfocus(w);
flushimage(display, 1);
}
}
--- a/wctl.c
+++ b/wctl.c
@@ -326,7 +326,8 @@
char *argv[4], **args;
w = wcreate(cmd.r, cmd.hidden, cmd.scrolling);
- assert(w);
+ if(w == nil)
+ return "window creation failed";
args = nil;
if(cmd.pid == 0){
argv[0] = "rc";
--- a/wind.c
+++ b/wind.c
@@ -132,6 +132,7 @@
threadcreate(winthread, w, mainstacksize);
wsetname(w);
+ wfocus(w);
return w;
}