Permalink
Browse files

Fix for mode not sticking and window unmap on first desktop change

  • Loading branch information...
1 parent bd04efc commit 331d75e38894d5c003bb3061ad0c54bcce37adaa @moetunes committed Apr 2, 2012
Showing with 7 additions and 1 deletion.
  1. +3 −0 ChangeLog
  2. +4 −1 dminiwm.c
View
@@ -1,3 +1,6 @@
+3/4/12
+ Fix for mode not sticking and window unmapping on first desktop change
+
2/4/12
Added multiview for multiple monitors
View
@@ -358,11 +358,14 @@ void change_desktop(const Arg arg) {
int next_view = desktops[arg.i].screen;
int cur_view = desktops[current_desktop].screen;
+
// Save current "properties"
save_desktop(current_desktop); previous_desktop = current_desktop;
view[cur_view].cd = current_desktop;
+
if(next_view != cur_view) {
select_desktop(view[next_view].cd);
+ save_desktop(current_desktop);
}
if(head == NULL)
XWarpPointer(dis, None, root, 0, 0, 0, 0, desktops[current_desktop].x+(desktops[current_desktop].w/2), desktops[current_desktop].h/2);
@@ -618,6 +621,7 @@ void switch_mode(const Arg arg) {
XUnmapWindow(dis, c->win);
if(mode == 2) master_size = desktops[current_desktop].h * MASTER_SIZE;
+ save_desktop(current_desktop);
tile();
update_current();
warp_pointer();
@@ -989,7 +993,6 @@ void setup() {
// Select first desktop by default
for(i=num_screens-1;i>=0;--i) {
const Arg arg = {.i = i};
- current_desktop = arg.i;
change_desktop(arg);
}
// To catch maprequest and destroynotify (if other wm running)

0 comments on commit 331d75e

Please sign in to comment.