X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftint.c;h=502c7b1812670159cb688471b6e8f06481c21582;hb=ac7ac9a45e625e754ae8e4aa5a0100097789dcf8;hp=0004f30ccb6770dfb812d67bcd5b6f05f5170edb;hpb=3d8a0dd90e405c4fb89e121b3e27d2b2177c45e2;p=chaz%2Ftint2 diff --git a/src/tint.c b/src/tint.c index 0004f30..502c7b1 100644 --- a/src/tint.c +++ b/src/tint.c @@ -31,6 +31,7 @@ #include #include +#include "version.h" #include "server.h" #include "window.h" #include "config.h" @@ -59,7 +60,7 @@ void init (int argc, char *argv[]) exit(0); } if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) { - printf("tint2 version 0.8\n"); + printf("tint2 version %s\n", VERSION_STRING); exit(0); } if (!strcmp(argv[i], "-c")) { @@ -494,6 +495,10 @@ void event_property_notify (XEvent *e) // Window title changed if (at == server.atom._NET_WM_VISIBLE_NAME || at == server.atom._NET_WM_NAME || at == server.atom.WM_NAME) { get_title(tsk); + if (g_tooltip.mapped && (g_tooltip.area == (Area*)tsk)) { + tooltip_copy_text((Area*)tsk); + tooltip_update(); + } panel_refresh = 1; } // Demand attention @@ -631,6 +636,7 @@ void dnd_message(XClientMessageEvent *e) int main (int argc, char *argv[]) { XEvent e; + XClientMessageEvent *ev; fd_set fdset; int x11_fd, i; Panel *panel; @@ -671,11 +677,6 @@ int main (int argc, char *argv[]) if (panel_refresh) { panel_refresh = 0; - // QUESTION: do we need this first refresh_systray, because we check refresh_systray once again later... - if (refresh_systray) { - panel = (Panel*)systray.area.panel; - XSetWindowBackgroundPixmap (server.dsp, panel->main_win, None); - } for (i=0 ; i < nb_panel ; i++) { panel = &panel1[i]; @@ -695,7 +696,6 @@ int main (int argc, char *argv[]) panel = (Panel*)systray.area.panel; if (refresh_systray && !panel->is_hidden) { refresh_systray = 0; - panel = (Panel*)systray.area.panel; // tint2 doen't draw systray icons. it just redraw background. XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap); // force icon's refresh @@ -776,6 +776,11 @@ int main (int argc, char *argv[]) break; case UnmapNotify: case DestroyNotify: + if (e.xany.window == server.composite_manager) { + // TODO: Stop real_transparency + //signal_pending = SIGUSR2; + break; + } if (e.xany.window == g_tooltip.window || !systray.area.on_screen) break; for (it = systray.list_icons; it; it = g_slist_next(it)) { @@ -787,6 +792,17 @@ int main (int argc, char *argv[]) break; case ClientMessage: + ev = &e.xclient; + if (ev->data.l[1] == server.atom._NET_WM_CM_S0) { + if (ev->data.l[2] == None) + // TODO: Stop real_transparency + //signal_pending = SIGUSR2; + ; + else + // TODO: Start real_transparency + //signal_pending = SIGUSR2; + ; + } if (!systray.area.on_screen) break; if (e.xclient.message_type == server.atom._NET_SYSTEM_TRAY_OPCODE && e.xclient.format == 32 && e.xclient.window == net_sel_win) { net_message(&e.xclient);