]> Dogcows Code - chaz/tint2/commitdiff
*fix* segfault when removing last virtual desktop while being on it
authorAndreas Fink <andreas.fink85@googlemail.com>
Wed, 29 Dec 2010 10:51:23 +0000 (10:51 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Wed, 29 Dec 2010 10:51:23 +0000 (10:51 +0000)
src/tint.c

index bc915eb3f3a51f31cbf110e6e7744376c46efe3e..5c96d54f1ca921c5713991d8f6546068bddce471 100644 (file)
@@ -524,6 +524,9 @@ void event_property_notify (XEvent *e)
                else if (at == server.atom._NET_NUMBER_OF_DESKTOPS) {
                        if (!taskbar_enabled) return;
                        server.nb_desktop = server_get_number_of_desktop ();
+                       if (server.nb_desktop <= server.desktop) {
+                               server.desktop = server.nb_desktop-1;
+                       }
                        cleanup_taskbar();
                        init_taskbar();
                        for (i=0 ; i < nb_panel ; i++) {
This page took 0.025572 seconds and 4 git commands to generate.