~cairo-dock-team/ubuntu/quantal/cairo-dock/3.0.2

« back to all changes in this revision

Viewing changes to src/implementations/cairo-dock-compiz-integration.c

  • Committer: Kees Cook
  • Date: 2011-08-11 19:31:26 UTC
  • mfrom: (19.1.1 cairo-dock)
  • Revision ID: kees@outflux.net-20110811193126-wh97aamdqx5gaf2f
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        if (s_pScaleProxy != NULL)
82
82
        {
83
83
                GError *erreur = NULL;
84
 
                gchar *cMatch = g_strdup_printf ("class=.%s*", cClass+1);  /// we need the real class here...
85
 
                //g_print ("match %s\n", cMatch);
 
84
                const gchar *cWmClass = cairo_dock_get_class_wm_class (cClass);
 
85
                gchar *cMatch;
 
86
                if (cWmClass)
 
87
                        cMatch = g_strdup_printf ("class=%s", cWmClass);
 
88
                else
 
89
                        cMatch = g_strdup_printf ("class=.%s*", cClass+1);
 
90
                g_print ("Compiz: match '%s'\n", cMatch);
86
91
                bSuccess = dbus_g_proxy_call (s_pScaleProxy, "activate", &erreur,
87
92
                        G_TYPE_STRING, "root",
88
93
                        G_TYPE_INT, cairo_dock_get_root_id (),
164
169
        cd_debug ("got rule : %s", cRule);
165
170
        
166
171
        // if our rule is not present yet, add it.
167
 
        if (cRule == NULL || *cRule == '\0' || (g_strstr_len (cRule, -1, "class=Cairo-dock & type=utility") == NULL && g_strstr_len (cRule, -1, "(class=Cairo-dock) & (type=utility)") == NULL && g_strstr_len (cRule, -1, "name=cairo-dock & type=utility") == NULL))
 
172
        if (cRule == NULL || *cRule == '\0' || (g_strstr_len (cRule, -1, "class=Cairo-dock & type=Utility") == NULL && g_strstr_len (cRule, -1, "(class=Cairo-dock) & (type=Utility)") == NULL && g_strstr_len (cRule, -1, "name=cairo-dock & type=Utility") == NULL))
168
173
        {
169
174
                gchar *cNewRule = (cRule == NULL || *cRule == '\0' ?
170
 
                        g_strdup ("(class=Cairo-dock & type=utility)") :
171
 
                        g_strdup_printf ("(%s) | (class=Cairo-dock & type=utility)", cRule));
 
175
                        g_strdup ("(class=Cairo-dock & type=Utility)") :
 
176
                        g_strdup_printf ("(%s) | (class=Cairo-dock & type=Utility)", cRule));
172
177
                cd_debug ("set rule : %s", cNewRule);
173
178
                
174
179
                dbus_g_proxy_call_no_reply (proxy,