]> Dogcows Code - chaz/tint2/commitdiff
*fix* allow minimizing omnipresent windows also on desktop 2-n
authorAndreas Fink <andreas.fink85@googlemail.com>
Wed, 11 Nov 2009 17:12:24 +0000 (17:12 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Wed, 11 Nov 2009 17:12:24 +0000 (17:12 +0000)
*fix* hopefully fixed issue 145
*fix* removed two unused variables

src/battery/battery.c
src/taskbar/task.h
src/tint.c

index c88c3a5b57d8ccdc5b4d42df5cc5062aa4487ede..5b98f1303917adc30a63e2dead224febf911f807 100644 (file)
@@ -150,7 +150,6 @@ void init_battery_panel(void *p)
 {
        Panel *panel = (Panel*)p;
        Battery *battery = &panel->battery;
-       FILE *fp;
        int bat_percentage_height, bat_percentage_height_ink, bat_time_height, bat_time_height_ink;
 
        if (!battery_enabled)
@@ -194,7 +193,7 @@ void update_battery() {
        FILE *fp;
        char tmp[25];
        int64_t energy_now = 0, energy_full = 0, current_now = 0;
-       int i, seconds = 0;
+       int seconds = 0;
        int8_t new_percentage = 0;
 
        fp = fopen(path_status, "r");
index b29e57624995d145284a9a5e7306792582f8a5cf..492c425ebe1fda38ae608ad6cc85bccc8d856d33 100644 (file)
@@ -54,6 +54,12 @@ typedef struct {
 } Task;
 
 
+typedef struct {
+       Task* tsk;
+       int tick;
+} Task_urgent;
+
+
 
 Task *add_task (Window win);
 void remove_task (Task *tsk);
index 163fd9ea223e8a2b2e649ebda61dd93cad6fac09..ece6dbc5f4655996caf1e3a169ae2a8f90e33c76 100644 (file)
@@ -265,8 +265,10 @@ void window_action (Task *tsk, int action)
                        XIconifyWindow (server.dsp, tsk->win, server.screen);
                        break;
                case TOGGLE_ICONIFY:
-                       if (tsk == task_active) XIconifyWindow (server.dsp, tsk->win, server.screen);
-                       else set_active (tsk->win);
+                       if (task_active && tsk->win == task_active->win)
+                               XIconifyWindow (server.dsp, tsk->win, server.screen);
+                       else
+                               set_active (tsk->win);
                        break;
                case SHADE:
                        window_toggle_shade (tsk->win);
@@ -478,10 +480,15 @@ void event_property_notify (XEvent *e)
        else {
                tsk = task_get_task (win);
                if (!tsk) {
-                       if ( at != server.atom._NET_WM_STATE)
-                               return;
-                       else if ( !(tsk = add_task(win)) )
+                       // some stupid wm send _NET_WM_STATE after the window was minimized to tray???
+                       if (at != server.atom._NET_WM_STATE)
                                return;
+                       else if (!window_is_skip_taskbar(win)) {
+                               if (tsk = add_task(win))
+                                       panel_refresh = 1;
+                               else
+                                       return;
+                       }
                }
                //printf("atom root_win = %s, %s\n", XGetAtomName(server.dsp, at), tsk->title);
 
This page took 0.025421 seconds and 4 git commands to generate.