Hello community,

here is the log from the commit of package tint2 for openSUSE:Factory checked 
in at 2016-05-13 09:24:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tint2 (Old)
 and      /work/SRC/openSUSE:Factory/.tint2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tint2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tint2/tint2.changes      2016-04-12 
19:39:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tint2.new/tint2.changes 2016-05-13 
09:24:17.000000000 +0200
@@ -1,0 +2,9 @@
+Thu May 12 10:01:27 UTC 2016 - [email protected]
+
+- Update to 0.12.10:
+  * Fixed crash in systray with non-Latin languagess (thanks zcodes)
+  * Invalidate cached pixmaps on resize/move (issue #576)
+  * Battery: do not show negative durations when the sensors return garbage
+  * Proper workaround for issue #555
+
+-------------------------------------------------------------------

Old:
----
  tint2-0.12.9.tar.gz

New:
----
  tint2-0.12.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tint2.spec ++++++
--- /var/tmp/diff_new_pack.0o6S5K/_old  2016-05-13 09:24:18.000000000 +0200
+++ /var/tmp/diff_new_pack.0o6S5K/_new  2016-05-13 09:24:18.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           tint2
-Version:        0.12.9
+Version:        0.12.10
 Release:        0
 Summary:        A lightweight X11 desktop panel and task manager
 License:        GPL-2.0
@@ -49,7 +49,7 @@
 %lang_package
 
 %prep
-%setup -q -n %{name}-v%{version}-d2b32d528f92891d4b185f6febd08835b231c3a3
+%setup -q -n %{name}-v%{version}-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0
 
 %build
 %cmake -DENABLE_EXAMPLES=ON -DDOCDIR=%{_docdir}/%{name}

++++++ tint2-0.12.9.tar.gz -> tint2-0.12.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/ChangeLog 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/ChangeLog
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/ChangeLog        
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/ChangeLog       
2016-05-07 09:34:12.000000000 +0200
@@ -1,3 +1,10 @@
+2016-05-07 0.12.10
+- Fixes:
+  - Fixed crash in systray with non-Latin languagess (thanks zcodes)
+  - Invalidate cached pixmaps on resize/move (issue #576)
+  - Battery: do not show negative durations when the sensors return garbage
+  - Proper workaround for issue #555
+
 2016-04-02 0.12.9
 - Fixes:
   - Regression: Do not detect empty areas as clickable (issue #572)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/README.md 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/README.md
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/README.md        
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/README.md       
2016-05-07 09:34:12.000000000 +0200
@@ -1,5 +1,5 @@
-# New stable release: 0.12.9
-Changes: https://gitlab.com/o9000/tint2/blob/0.12.9/ChangeLog
+# Latest stable release: 0.12.10
+Changes: https://gitlab.com/o9000/tint2/blob/0.12.10/ChangeLog
 
 Documentation: https://gitlab.com/o9000/tint2/wikis/Configure
 
@@ -7,7 +7,7 @@
 ```
 git clone https://gitlab.com/o9000/tint2.git
 cd tint2
-git checkout 0.12.9
+git checkout 0.12.10
 mkdir build
 cd build
 cmake ..
@@ -69,10 +69,10 @@
 
 # Screenshots
 
-## Default config of the latest release:
+## Default config:
 
 
![Screenshot_2016-01-23_14-42-57](https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png)
 
-## Various configurations:
+## Various configs:
 
 ![screenshot](https://gitlab.com/o9000/tint2/wikis/screenshot.png)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/battery/linux.c 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/battery/linux.c
--- 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/battery/linux.c  
    2016-04-02 14:11:01.000000000 +0200
+++ 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/battery/linux.c 
    2016-05-07 09:34:12.000000000 +0200
@@ -437,6 +437,7 @@
                        seconds = 3600 * (total_energy_full - total_energy_now) 
/ total_power_now;
                else if (state->state == BATTERY_DISCHARGING)
                        seconds = 3600 * total_energy_now / total_power_now;
+               seconds = MAX(0, seconds);
        }
        battery_state_set_time(state, seconds);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/panel.c 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/panel.c
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/panel.c      
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/panel.c     
2016-05-07 09:34:12.000000000 +0200
@@ -603,6 +603,21 @@
                                        num_atoms);
 }
 
+void replace_panel_all_desktops(Panel *p)
+{
+       XClientMessageEvent m;
+       memset(&m, 0, sizeof(m));
+       m.type = ClientMessage;
+       m.send_event = True;
+       m.display = server.display;
+       m.window = p->main_win;
+       m.message_type = server.atom._NET_WM_DESKTOP;
+       m.format = 32;
+       m.data.l[0] = ALL_DESKTOPS;
+       XSendEvent(server.display, server.root_win, False, 
SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *)&m);
+       XSync(server.display, False);
+}
+
 void set_panel_properties(Panel *p)
 {
        XStoreName(server.display, p->main_win, panel_window_name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/panel.h 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/panel.h
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/panel.h      
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/panel.h     
2016-05-07 09:34:12.000000000 +0200
@@ -155,6 +155,7 @@
 
 void set_panel_items_order(Panel *p);
 void place_panel_all_desktops(Panel *p);
+void replace_panel_all_desktops(Panel *p);
 void set_panel_properties(Panel *p);
 
 // draw background panel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/systray/systraybar.c
 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/systray/systraybar.c
--- 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/systray/systraybar.c
 2016-04-02 14:11:01.000000000 +0200
+++ 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/systray/systraybar.c
        2016-05-07 09:34:12.000000000 +0200
@@ -33,6 +33,7 @@
 #include "systraybar.h"
 #include "server.h"
 #include "panel.h"
+#include "window.h"
 
 GSList *icons;
 
@@ -534,15 +535,7 @@
 
        XSelectInput(server.display, win, StructureNotifyMask | 
PropertyChangeMask | ResizeRedirectMask);
 
-       XTextProperty xname;
-       char *name;
-       if (XGetWMName(server.display, win, &xname)) {
-               name = strdup((char *)xname.value);
-               XFree(xname.value);
-       } else {
-               name = strdup("");
-       }
-
+    char *name = get_window_name(win);
        if (systray_profile)
                fprintf(stderr, "[%f] %s:%d win = %lu (%s)\n", 
profiling_get_time(), __FUNCTION__, __LINE__, win, name);
        Panel *panel = systray.area.panel;
@@ -1068,15 +1061,7 @@
        Atom at = e->xproperty.atom;
        if (at == server.atom.WM_NAME) {
                free(traywin->name);
-
-               XTextProperty xname;
-               if (XGetWMName(server.display, traywin->win, &xname)) {
-                       traywin->name = strdup((char *)xname.value);
-                       XFree(xname.value);
-               } else {
-                       traywin->name = strdup("");
-               }
-
+        traywin->name = get_window_name(traywin->win);
                if (systray.sort == SYSTRAY_SORT_ASCENDING || systray.sort == 
SYSTRAY_SORT_DESCENDING) {
                        systray.list_icons = g_slist_sort(systray.list_icons, 
compare_traywindows);
                        // print_icons();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/tint.c 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/tint.c
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/tint.c       
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/tint.c      
2016-05-07 09:34:12.000000000 +0200
@@ -985,7 +985,7 @@
                Panel *p = &panels[i];
                if (win == p->main_win) {
                        if (at == server.atom._NET_WM_DESKTOP && 
get_window_desktop(p->main_win) != ALL_DESKTOPS)
-                               place_panel_all_desktops(p);
+                               replace_panel_all_desktops(p);
                        return;
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/area.c 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/area.c
--- old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/area.c  
2016-04-02 14:11:01.000000000 +0200
+++ new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/area.c 
2016-05-07 09:34:12.000000000 +0200
@@ -70,17 +70,15 @@
                relayout_fixed(l->data);
 
        // Recalculate size
-       a->_changed = 0;
+       a->_changed = FALSE;
        if (a->resize_needed && a->size_mode == LAYOUT_FIXED) {
-               a->resize_needed = 0;
+               a->resize_needed = FALSE;
 
-               if (a->_resize) {
-                       if (a->_resize(a)) {
-                               // The size hash changed => resize needed for 
the parent
-                               if (a->parent)
-                                       ((Area *)a->parent)->resize_needed = 1;
-                               a->_changed = 1;
-                       }
+               if (a->_resize && a->_resize(a)) {
+                       // The size has changed => resize needed for the parent
+                       if (a->parent)
+                               ((Area *)a->parent)->resize_needed = TRUE;
+                       a->_changed = TRUE;
                }
        }
 }
@@ -92,10 +90,11 @@
 
        // Area is resized before its children
        if (a->resize_needed && a->size_mode == LAYOUT_DYNAMIC) {
-               a->resize_needed = 0;
+               a->resize_needed = FALSE;
 
                if (a->_resize) {
-                       a->_resize(a);
+                       if (a->_resize(a))
+                               a->_changed = TRUE;
                        // resize children with LAYOUT_DYNAMIC
                        for (GList *l = a->children; l; l = l->next) {
                                Area *child = ((Area *)l->data);
@@ -119,13 +118,13 @@
                                        if (pos != child->posx) {
                                                // pos changed => redraw
                                                child->posx = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                } else {
                                        if (pos != child->posy) {
                                                // pos changed => redraw
                                                child->posy = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                }
 
@@ -148,13 +147,13 @@
                                        if (pos != child->posx) {
                                                // pos changed => redraw
                                                child->posx = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                } else {
                                        if (pos != child->posy) {
                                                // pos changed => redraw
                                                child->posy = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                }
 
@@ -187,13 +186,13 @@
                                        if (pos != child->posx) {
                                                // pos changed => redraw
                                                child->posx = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                } else {
                                        if (pos != child->posy) {
                                                // pos changed => redraw
                                                child->posy = pos;
-                                               child->_changed = 1;
+                                               child->_changed = TRUE;
                                        }
                                }
 
@@ -224,7 +223,7 @@
                return;
 
        if (a->_redraw_needed) {
-               a->_redraw_needed = 0;
+               a->_redraw_needed = FALSE;
                draw(a);
        }
 
@@ -286,7 +285,7 @@
                                        modulo--;
                                }
                                if (child->width != old_width)
-                                       child->_changed = 1;
+                                       child->_changed = TRUE;
                        }
                }
        } else {
@@ -326,7 +325,7 @@
                                        modulo--;
                                }
                                if (child->height != old_height)
-                                       child->_changed = 1;
+                                       child->_changed = TRUE;
                        }
                }
        }
@@ -361,7 +360,7 @@
 
        a->on_screen = FALSE;
        if (parent)
-               parent->resize_needed = 1;
+               parent->resize_needed = TRUE;
        if (panel_horizontal)
                a->width = 0;
        else
@@ -374,12 +373,27 @@
 
        a->on_screen = TRUE;
        if (parent)
-               parent->resize_needed = 1;
-       a->resize_needed = 1;
+               parent->resize_needed = TRUE;
+       a->resize_needed = TRUE;
 }
 
 void draw(Area *a)
 {
+       if (a->_changed) {
+               // On resize/move, invalidate cached pixmaps
+               for (int i = 0; i < MOUSE_STATE_COUNT; i++) {
+                       XFreePixmap(server.display, a->pix_by_state[i]);
+                       if (a->pix == a->pix_by_state[i]) {
+                               a->pix = None;
+                       }
+                       a->pix_by_state[i] = None;
+               }
+               if (a->pix) {
+                       XFreePixmap(server.display, a->pix);
+                       a->pix = None;
+               }
+       }
+
        if (a->pix) {
                XFreePixmap(server.display, a->pix);
                if (a->pix_by_state[a->has_mouse_over_effect ? a->mouse_state : 
0] != a->pix)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/window.c 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/window.c
--- 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/window.c    
    2016-04-02 14:11:01.000000000 +0200
+++ 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/window.c   
    2016-05-07 09:34:12.000000000 +0200
@@ -320,3 +320,32 @@
        *ih = height[icon_num];
        return icon_data[icon_num];
 }
+
+// Thanks zcodes!
+char *get_window_name(Window win)
+{
+    XTextProperty text_property;
+    Status status = XGetWMName(server.display, win, &text_property);
+    if (!status || !text_property.value || !text_property.nitems) {
+        return strdup("");
+    }
+
+    char **name_list;
+    int count;
+    status = Xutf8TextPropertyToTextList(server.display, &text_property, 
&name_list, &count);
+    if (status < Success || !count) {
+        XFree(text_property.value);
+        return strdup("");
+    }
+
+    if (!name_list[0]) {
+        XFreeStringList(name_list);
+        XFree(text_property.value);
+        return strdup("");
+    }
+
+    char *result = strdup(name_list[0]);
+    XFreeStringList(name_list);
+    XFree(text_property.value);
+    return result;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/window.h 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/window.h
--- 
old/tint2-v0.12.9-d2b32d528f92891d4b185f6febd08835b231c3a3/src/util/window.h    
    2016-04-02 14:11:01.000000000 +0200
+++ 
new/tint2-v0.12.10-4ee1e8f2fa492f1bf251689258fae3ce6b274ad0/src/util/window.h   
    2016-05-07 09:34:12.000000000 +0200
@@ -33,4 +33,6 @@
 int get_icon_count(gulong *data, int num);
 gulong *get_best_icon(gulong *data, int icon_count, int num, int *iw, int *ih, 
int best_icon_size);
 
+char *get_window_name(Window win);
+
 #endif


Reply via email to