int panel_autohide_height;
int panel_strut_policy;
-Task *task_active;
-Task *task_drag;
int max_tick_urgent;
// panel's initial config
panel1 = 0;
nb_panel = 0;
default_icon = NULL;
- task_active = 0;
- task_drag = 0;
task_dragged = 0;
panel_horizontal = 1;
panel_position = CENTER;
}
if (panel1) free(panel1);
- if (backgrounds) g_array_free(backgrounds, 1);
+ if (backgrounds)
+ g_array_free(backgrounds, 1);
if (panel_config.g_task.font_desc) pango_font_description_free(panel_config.g_task.font_desc);
}
extern int panel_autohide_height; // for vertical panels this is of course the width
extern int panel_strut_policy;
-extern Task *task_active;
-extern Task *task_drag;
extern int max_tick_urgent;
extern GArray* backgrounds;
if (server.monitor) {
int i;
for (i=0; i<server.nb_monitor; ++i)
- g_strfreev(server.monitor[i].names);
+ if (server.monitor[i].names)
+ g_strfreev(server.monitor[i].names);
free(server.monitor);
}
if (server.gc) XFreeGC(server.dsp, server.gc);
void get_monitors()
{
- if (server.monitor) {
- int i;
- for (i=0; i<server.nb_monitor; ++i)
- g_strfreev(server.monitor[i].names);
- free(server.monitor);
- }
- server.nb_monitor = 0;
- server.monitor = 0;
-
int i, j, nbmonitor;
if (XineramaIsActive(server.dsp)) {
XineramaScreenInfo *info = XineramaQueryScreens(server.dsp, &nbmonitor);
}
next:
for (j=i; j<server.nb_monitor; ++j)
- g_strfreev(server.monitor[j].names);
+ if (server.monitor[j].names)
+ g_strfreev(server.monitor[j].names);
server.nb_monitor = i;
server.monitor = realloc(server.monitor, server.nb_monitor * sizeof(Monitor));
qsort(server.monitor, server.nb_monitor, sizeof(Monitor), compareMonitorPos);
server.monitor[0].x = server.monitor[0].y = 0;
server.monitor[0].width = DisplayWidth (server.dsp, server.screen);
server.monitor[0].height = DisplayHeight (server.dsp, server.screen);
+ server.monitor[0].names = 0;
}
}
*/
GHashTable* win_to_task_table;
+Task *task_active;
+Task *task_drag;
+
guint win_hash(gconstpointer key) { return (guint)*((Window*)key); }
gboolean win_compare(gconstpointer a, gconstpointer b) { return (*((Window*)a) == *((Window*)b)); }
void free_ptr_array(gpointer data) { g_ptr_array_free(data, 1); }
if (win_to_task_table == 0)
win_to_task_table = g_hash_table_new_full(win_hash, win_compare, free, free_ptr_array);
+ task_active = 0;
+ task_drag = 0;
+
for (i=0 ; i < nb_panel ; i++) {
panel = &panel1[i];
#include "task.h"
extern GHashTable* win_to_task_table;
+extern Task *task_active;
+extern Task *task_drag;
+
// tint2 use one taskbar per desktop.
typedef struct {
// always start with area