]> Dogcows Code - chaz/tint2/commitdiff
replace real_transparency option with an autodetect of composite manager.
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 15 Jan 2010 22:23:00 +0000 (22:23 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Fri, 15 Jan 2010 22:23:00 +0000 (22:23 +0000)
src/config.c
src/server.c
src/server.h

index f4e91a8b9da78694f1a929c0cf08d6e7f0fa5c60..db0f1f81042ceae2a342839b023f745f99b75fed 100644 (file)
@@ -295,8 +295,6 @@ void add_entry (char *key, char *value)
                panel_dock = atoi (value);
        else if (strcmp (key, "urgent_nb_of_blink") == 0)
                max_tick_urgent = (atoi (value) * 2) + 1;
-       else if (strcmp (key, "real_transparency") == 0)
-               real_transparency = atoi(value);
        else if (strcmp (key, "panel_layer") == 0) {
                if (strcmp(value, "bottom") == 0)
                        panel_layer = BOTTOM_LAYER;
index c1401aedcc603e56cb08f6448a5ac42c7d0b621a..2d7de6e20ec19bc6d799d479fa862fcef4a568a7 100644 (file)
@@ -69,6 +69,7 @@ void server_init_atoms ()
        server.atom._NET_CLOSE_WINDOW = XInternAtom (server.dsp, "_NET_CLOSE_WINDOW", False);
        server.atom.UTF8_STRING = XInternAtom (server.dsp, "UTF8_STRING", False);
        server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_SUPPORTING_WM_CHECK", False);
+       server.atom._NET_WM_CM_S0 = XInternAtom (server.dsp, "_NET_WM_CM_S0", False);
        server.atom._NET_SUPPORTING_WM_CHECK = XInternAtom (server.dsp, "_NET_WM_NAME", False);
        server.atom._NET_WM_STRUT_PARTIAL = XInternAtom (server.dsp, "_NET_WM_STRUT_PARTIAL", False);
        server.atom.WM_NAME = XInternAtom(server.dsp, "WM_NAME", False);
@@ -326,6 +327,12 @@ void server_init_visual()
        }
        XFree (xvi);
 
+       // check composite manager
+       if (XGetSelectionOwner(server.dsp, server.atom._NET_WM_CM_S0) == None)
+               real_transparency = 0;
+       else
+               real_transparency = 1;
+
        if (visual && real_transparency) {
                server.depth = 32;
                printf("real transparency on... depth: %d\n", server.depth);
index ffd0831d5a336f14986f2f6c2896bc569028413a..11ea89bd7f026c6e0ec6547b93d393256a506bc7 100644 (file)
@@ -51,6 +51,7 @@ typedef struct Global_atom
        Atom _NET_CLOSE_WINDOW;
        Atom UTF8_STRING;
        Atom _NET_SUPPORTING_WM_CHECK;
+       Atom _NET_WM_CM_S0;
        Atom _NET_WM_STRUT_PARTIAL;
        Atom WM_NAME;
        Atom __SWM_VROOT;
This page took 0.03075 seconds and 4 git commands to generate.