~cairo-dock-team/ubuntu/oneiric/cairo-dock/2.4.0-0beta2

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-X-manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-09-07 20:31:25 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100907203125-tkq6wc8rw0flx5se
Tags: 2.2.0~0rc1-0ubuntu1
* New Upstream Version (LP: #632055)
* Fixed a few bugs on LP:
 - LP: #618336 all button tips visible if icons 'maximum zoom' set to 1.0
 - LP: #614686 create new sud-dock icon that looking like flat
 - LP: #612617 Add custom launchers or sub-docks, can't modify name.
 - LP: #612355 Add option in config file to set GL/Cairo mode            
 - LP: #611733 icon labels go off-screen
* Fixed a crash when changing theme or gauges
* Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        cairo_dock_notify (CAIRO_DOCK_SCREEN_GEOMETRY_ALTERED);
119
119
}
120
120
 
121
 
static void _check_mouse_outside (CairoDock *pDock, gpointer data)
 
121
/**static void _check_mouse_outside (CairoDock *pDock, gpointer data)
122
122
{
123
123
        if (pDock->container.bIsHorizontal)
124
124
                gdk_window_get_pointer (pDock->container.pWidget->window, &pDock->container.iMouseX, &pDock->container.iMouseY, NULL);
125
125
        else
126
126
                gdk_window_get_pointer (pDock->container.pWidget->window, &pDock->container.iMouseY, &pDock->container.iMouseX, NULL);
 
127
        g_print ("%s (%d, %d)\n", __func__, pDock->container.iMouseX, pDock->container.iMouseY);
127
128
        cairo_dock_calculate_dock_icons (pDock);  // pour faire retrecir le dock si on n'est pas dedans, merci X de nous faire sortir du dock alors que la souris est toujours dedans :-/
128
 
}
 
129
}*/
129
130
static gboolean _cairo_dock_unstack_Xevents (gpointer data)
130
131
{
131
132
        static XEvent event;
132
 
        static gboolean bCheckMouseIsOutside = FALSE;
 
133
        ///static gboolean s_iCheckMouseIsOutsideCount = 0;
133
134
        
134
135
        if (!g_pPrimaryContainer)  // peut arriver en cours de chargement d'un theme.
135
136
                return TRUE;
138
139
        Window Xid;
139
140
        Window root = DefaultRootWindow (s_XDisplay);
140
141
        Icon *icon;
141
 
        if (bCheckMouseIsOutside)
142
 
        {
143
 
                //g_print ("bCheckMouseIsOutside\n");
144
 
                bCheckMouseIsOutside = FALSE;
145
 
                cairo_dock_foreach_root_docks ((GFunc)_check_mouse_outside, NULL);
146
 
        }
147
142
        
148
143
        while (XCheckMaskEvent (s_XDisplay, event_mask, &event))
149
144
        {
167
162
                                }
168
163
                                else if (event.xproperty.atom == s_aNetCurrentDesktop || event.xproperty.atom == s_aNetDesktopViewport)
169
164
                                {
170
 
                                        bCheckMouseIsOutside = _on_change_current_desktop_viewport ();  // -> CAIRO_DOCK_DESKTOP_CHANGED
171
 
                                        bCheckMouseIsOutside = TRUE;  // au prochain passage, on testera que X ne nous a pas fait sortir du dock sans raison.
 
165
                                        _on_change_current_desktop_viewport ();  // -> CAIRO_DOCK_DESKTOP_CHANGED
 
166
                                        ///s_iCheckMouseIsOutsideCount = 1;  // arrive a 3, on testera que X ne nous a pas fait sortir du dock sans raison.
172
167
                                }
173
168
                                else if (event.xproperty.atom == s_aNetNbDesktops)
174
169
                                {
230
225
                XSync (s_XDisplay, True);  // True <=> discard.
231
226
        //g_print ("XEventsQueued : %d\n", XEventsQueued (s_XDisplay, QueuedAfterFlush));  // QueuedAlready, QueuedAfterReading, QueuedAfterFlush
232
227
        
 
228
        /**if (s_iCheckMouseIsOutsideCount != 0)
 
229
        {
 
230
                s_iCheckMouseIsOutsideCount ++;  // donc la toute premiere fois on est a 2.
 
231
                if (s_iCheckMouseIsOutsideCount & 1)  // donc on teste a t+1 et t+3
 
232
                {
 
233
                        cairo_dock_foreach_root_docks ((GFunc)_check_mouse_outside, NULL);
 
234
                }
 
235
                if (s_iCheckMouseIsOutsideCount > 4)  // apres les 2 tests on arrete.
 
236
                {
 
237
                        s_iCheckMouseIsOutsideCount = 0;
 
238
                }
 
239
        }*/
233
240
        return TRUE;
234
241
}
235
242