gimp but for windows: a wayland compositor
git clone https://github.com/m-col/wimp
Files | Refs | Readme

Commit 2e9b3d1167c2cf54e70006506cd3042ac6a0b7c2
Parent: 38ca1532c5a3407560e1ce10ed84def30a313c15
Author: mcol <mcol@posteo.net>
Date: 2021-01-31 19:34:21 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-01-31 19:34:21 +0000

don't try to set desk to current desk

src/desk.c Modified

@@ -52,18 +52,20 @@
 
 void set_desk(struct desk *desk) {
     struct view *view;
-    wimp.can_steal_focus = false;
-    wl_list_for_each(view, &wimp.current_desk->views, link) {
-	unmap_view(view);
-    }
-    wimp.current_desk = desk;
-    wl_list_for_each(view, &wimp.current_desk->views, link) {
-	map_view(view);
-    }
-    wimp.can_steal_focus = true;
-    if (!wl_list_empty(&desk->views)) {
-	view = wl_container_of(desk->views.next, view, link);
-	focus_view(view, view->surface->surface);
+    if (desk != wimp.current_desk) {
+	wimp.can_steal_focus = false;
+	wl_list_for_each(view, &wimp.current_desk->views, link) {
+	    unmap_view(view);
+	}
+	wimp.current_desk = desk;
+	wl_list_for_each(view, &wimp.current_desk->views, link) {
+	    map_view(view);
+	}
+	wimp.can_steal_focus = true;
+	if (!wl_list_empty(&desk->views)) {
+	    view = wl_container_of(desk->views.next, view, link);
+	    focus_view(view, view->surface->surface);
+	}
     }
 }