support skip_taskbar by Andreas.Fink85

git-svn-id: http://tint2.googlecode.com/svn/trunk@169 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr 2009-09-07 21:41:21 +00:00
parent a17b62f76f
commit babda8e268
13 changed files with 1399 additions and 1369 deletions

View file

@ -1,3 +1,7 @@
2009-09-07
- fixed issue 117 : support skip_taskbar by Andreas.Fink85
- cleanup : switch space to tab
2009-09-01
- fixed segfault

View file

@ -478,7 +478,12 @@ void event_property_notify (XEvent *e)
}
else {
tsk = task_get_task (win);
if (!tsk) return;
if (!tsk) {
if ( at != server.atom._NET_WM_STATE)
return;
else if ( !(tsk = add_task(win)) )
return;
}
//printf("atom root_win = %s, %s\n", XGetAtomName(server.dsp, at), tsk->title);
// Window title changed
@ -507,6 +512,9 @@ void event_property_notify (XEvent *e)
tick_urgent = 0;
time_precision = 1;
}
if (window_is_skip_taskbar(win)) {
remove_task( tsk );
}
}
else if (at == server.atom.WM_STATE) {
// Iconic state

View file

@ -165,6 +165,23 @@ int window_is_urgent (Window win)
}
int window_is_skip_taskbar (Window win)
{
Atom *at;
int count, i;
at = server_get_property(win, server.atom._NET_WM_STATE, XA_ATOM, &count);
for (i=0; i<count; i++) {
if (at[i] == server.atom._NET_WM_STATE_SKIP_TASKBAR) {
XFree(at);
return 1;
}
}
XFree(at);
return 0;
}
int server_get_number_of_desktop ()
{
return get_property32(server.root_win, server.atom._NET_NUMBER_OF_DESKTOPS, XA_CARDINAL);

View file

@ -21,6 +21,7 @@ int window_is_iconified (Window win);
int window_is_urgent (Window win);
int window_is_hidden (Window win);
int window_is_active (Window win);
int window_is_skip_taskbar (Window win);
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);
void window_maximize_restore (Window win);