Rensselaer Center for Open Source Software

Fixed a few bugs in the tiling

6 files changed, 11 lines added, 8 lines removed

Changes

--- src/events.c 4f8eba65330055e194975a9b4da093f1b460895a
+++ src/events.c 2e191476aa83ed259b95026f1f6535ad0b653a9e
@@ -57,19 +57,19 @@
-    focus_win(wm, ws->win_sel->next);
+    if (ws->win_sel) focus_win(wm, ws->win_sel->next);
-    focus_win(wm, ws->win_sel->prev);
+    if (ws->win_sel) focus_win(wm, ws->win_sel->prev);
-    move_win_split(wm, ws, ws->win_split->next);
+    if (ws->win_split) move_win_split(wm, ws, ws->win_split->next);
-    move_win_split(wm, ws, ws->win_split->prev);
+    if (ws->win_split) move_win_split(wm, ws, ws->win_split->prev);
--- src/window.c 4f8eba65330055e194975a9b4da093f1b460895a
+++ src/window.c 2e191476aa83ed259b95026f1f6535ad0b653a9e
@@ -39,9 +39,6 @@
-  if (w->next != NULL)
-    delete_win(w->next);
-
--- src/workspace.c 4f8eba65330055e194975a9b4da093f1b460895a
+++ src/workspace.c 2e191476aa83ed259b95026f1f6535ad0b653a9e
@@ -36,12 +36,15 @@
+  win_t *t;
-  delete_win(w->win_head);
+  for (t = w->win_head; t; t = t->next)
+    delete_win(t);
+
@@ -120,6 +123,9 @@
+  
+  if (new_head == old_head) 
+    return;
fenestra • 52 weeks ago