*fix* issue 282
*fix* correct x/y coordinates for tooltip on multi-head setup *fix* delete multitimer hashmap *fix* cleanup_panel() needs to be called after cleanup_launcher() git-svn-id: http://tint2.googlecode.com/svn/trunk@544 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
9e81bcbf6a
commit
906ee82dbf
8 changed files with 21 additions and 18 deletions
|
@ -510,7 +510,7 @@ void set_panel_properties(Panel *p)
|
||||||
XChangeProperty(server.dsp, p->main_win, server.atom._MOTIF_WM_HINTS, server.atom._MOTIF_WM_HINTS, 32, PropModeReplace, (unsigned char *) prop, 5);
|
XChangeProperty(server.dsp, p->main_win, server.atom._MOTIF_WM_HINTS, server.atom._MOTIF_WM_HINTS, 32, PropModeReplace, (unsigned char *) prop, 5);
|
||||||
|
|
||||||
// XdndAware - Register for Xdnd events
|
// XdndAware - Register for Xdnd events
|
||||||
long version=5;
|
Atom version=4;
|
||||||
XChangeProperty(server.dsp, p->main_win, server.atom.XdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&version, 1);
|
XChangeProperty(server.dsp, p->main_win, server.atom.XdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&version, 1);
|
||||||
|
|
||||||
update_strut(p);
|
update_strut(p);
|
||||||
|
|
|
@ -278,7 +278,7 @@ void start_net()
|
||||||
|
|
||||||
// v0.3 trayer specification. tint2 always horizontal.
|
// v0.3 trayer specification. tint2 always horizontal.
|
||||||
// Vertical panel will draw the systray horizontal.
|
// Vertical panel will draw the systray horizontal.
|
||||||
int orient = 0;
|
long orient = 0;
|
||||||
XChangeProperty(server.dsp, net_sel_win, server.atom._NET_SYSTEM_TRAY_ORIENTATION, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &orient, 1);
|
XChangeProperty(server.dsp, net_sel_win, server.atom._NET_SYSTEM_TRAY_ORIENTATION, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &orient, 1);
|
||||||
VisualID vid;
|
VisualID vid;
|
||||||
if (server.visual32 && (systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0))
|
if (server.visual32 && (systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0))
|
||||||
|
|
|
@ -209,7 +209,7 @@ void get_icon (Task *tsk)
|
||||||
int i;
|
int i;
|
||||||
Imlib_Image img = NULL;
|
Imlib_Image img = NULL;
|
||||||
XWMHints *hints = 0;
|
XWMHints *hints = 0;
|
||||||
long *data = 0;
|
gulong *data = 0;
|
||||||
|
|
||||||
int k;
|
int k;
|
||||||
for (k=0; k<TASK_STATE_COUNT; ++k) {
|
for (k=0; k<TASK_STATE_COUNT; ++k) {
|
||||||
|
@ -224,10 +224,9 @@ void get_icon (Task *tsk)
|
||||||
if (data) {
|
if (data) {
|
||||||
// get ARGB icon
|
// get ARGB icon
|
||||||
int w, h;
|
int w, h;
|
||||||
long *tmp_data;
|
gulong *tmp_data;
|
||||||
|
|
||||||
tmp_data = get_best_icon (data, get_icon_count (data, i), i, &w, &h, panel->g_task.icon_size1);
|
tmp_data = get_best_icon (data, get_icon_count (data, i), i, &w, &h, panel->g_task.icon_size1);
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
DATA32 icon_data[w * h];
|
DATA32 icon_data[w * h];
|
||||||
int length = w * h;
|
int length = w * h;
|
||||||
|
|
|
@ -158,13 +158,13 @@ void cleanup()
|
||||||
{
|
{
|
||||||
cleanup_timeout();
|
cleanup_timeout();
|
||||||
cleanup_systray();
|
cleanup_systray();
|
||||||
cleanup_panel();
|
|
||||||
cleanup_tooltip();
|
cleanup_tooltip();
|
||||||
cleanup_clock();
|
cleanup_clock();
|
||||||
cleanup_launcher();
|
cleanup_launcher();
|
||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
cleanup_battery();
|
cleanup_battery();
|
||||||
#endif
|
#endif
|
||||||
|
cleanup_panel();
|
||||||
cleanup_config();
|
cleanup_config();
|
||||||
|
|
||||||
if (default_icon) {
|
if (default_icon) {
|
||||||
|
|
|
@ -151,22 +151,22 @@ void tooltip_adjust_geometry()
|
||||||
Panel* panel = g_tooltip.panel;
|
Panel* panel = g_tooltip.panel;
|
||||||
int screen_width = server.monitor[panel->monitor].x + server.monitor[panel->monitor].width;
|
int screen_width = server.monitor[panel->monitor].x + server.monitor[panel->monitor].width;
|
||||||
int screen_height = server.monitor[panel->monitor].y + server.monitor[panel->monitor].height;
|
int screen_height = server.monitor[panel->monitor].y + server.monitor[panel->monitor].height;
|
||||||
if ( x+width <= screen_width && y+height <= screen_height && x>=0 && y>=0)
|
if ( x+width <= screen_width && y+height <= screen_height && x>=server.monitor[panel->monitor].x && y>=server.monitor[panel->monitor].y )
|
||||||
return; // no adjustment needed
|
return; // no adjustment needed
|
||||||
|
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
min_x=0;
|
min_x=0;
|
||||||
max_width=screen_width;
|
max_width=server.monitor[panel->monitor].width;
|
||||||
max_height=screen_height-panel->area.height;
|
max_height=server.monitor[panel->monitor].height-panel->area.height;
|
||||||
if (panel_position & BOTTOM)
|
if (panel_position & BOTTOM)
|
||||||
min_y=0;
|
min_y=0;
|
||||||
else
|
else
|
||||||
min_y=panel->area.height;
|
min_y=panel->area.height;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
max_width=screen_width-panel->area.width;
|
max_width=server.monitor[panel->monitor].width-panel->area.width;
|
||||||
min_y=0;
|
min_y=0;
|
||||||
max_height=screen_height;
|
max_height=server.monitor[panel->monitor].height;
|
||||||
if (panel_position & LEFT)
|
if (panel_position & LEFT)
|
||||||
min_x=panel->area.width;
|
min_x=panel->area.width;
|
||||||
else
|
else
|
||||||
|
|
|
@ -77,6 +77,10 @@ void cleanup_timeout()
|
||||||
free(t);
|
free(t);
|
||||||
timeout_list = g_slist_remove(timeout_list, t);
|
timeout_list = g_slist_remove(timeout_list, t);
|
||||||
}
|
}
|
||||||
|
if (multi_timeouts) {
|
||||||
|
g_hash_table_destroy(multi_timeouts);
|
||||||
|
multi_timeouts = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Implementation notes for timeouts: The timeouts are kept in a GSList sorted by their
|
/** Implementation notes for timeouts: The timeouts are kept in a GSList sorted by their
|
||||||
|
|
|
@ -221,17 +221,17 @@ int window_is_active (Window win)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int get_icon_count (long *data, int num)
|
int get_icon_count (gulong *data, int num)
|
||||||
{
|
{
|
||||||
int count, pos, w, h;
|
int count, pos, w, h;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
while (pos < num) {
|
while (pos+2 < num) {
|
||||||
w = data[pos++];
|
w = data[pos++];
|
||||||
h = data[pos++];
|
h = data[pos++];
|
||||||
pos += w * h;
|
pos += w * h;
|
||||||
if (pos > num || w * h == 0) break;
|
if (pos > num || w <= 0 || h <= 0) break;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,10 +239,10 @@ int get_icon_count (long *data, int num)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long *get_best_icon (long *data, int icon_count, int num, int *iw, int *ih, int best_icon_size)
|
gulong *get_best_icon (gulong *data, int icon_count, int num, int *iw, int *ih, int best_icon_size)
|
||||||
{
|
{
|
||||||
int width[icon_count], height[icon_count], pos, i, w, h;
|
int width[icon_count], height[icon_count], pos, i, w, h;
|
||||||
long *icon_data[icon_count];
|
gulong *icon_data[icon_count];
|
||||||
|
|
||||||
/* List up icons */
|
/* List up icons */
|
||||||
pos = 0;
|
pos = 0;
|
||||||
|
|
|
@ -22,8 +22,8 @@ int window_is_urgent (Window win);
|
||||||
int window_is_hidden (Window win);
|
int window_is_hidden (Window win);
|
||||||
int window_is_active (Window win);
|
int window_is_active (Window win);
|
||||||
int window_is_skip_taskbar (Window win);
|
int window_is_skip_taskbar (Window win);
|
||||||
int get_icon_count (long *data, int num);
|
int get_icon_count (gulong *data, int num);
|
||||||
long *get_best_icon (long *data, int icon_count, int num, int *iw, int *ih, int best_icon_size);
|
gulong *get_best_icon (gulong *data, int icon_count, int num, int *iw, int *ih, int best_icon_size);
|
||||||
void window_maximize_restore (Window win);
|
void window_maximize_restore (Window win);
|
||||||
void window_toggle_shade (Window win);
|
void window_toggle_shade (Window win);
|
||||||
int window_get_desktop (Window win);
|
int window_get_desktop (Window win);
|
||||||
|
|
Loading…
Reference in a new issue