~ubuntu-branches/ubuntu/vivid/cairo-dock/vivid

« back to all changes in this revision

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

  • Committer: Matthieu Baerts
  • Date: 2013-03-25 23:33:47 UTC
  • mfrom: (1.1.31)
  • Revision ID: matttbe@gmail.com-20130325233347-tntqszmhp5ji5cj0
Tags: 3.2.0-0ubuntu1
* New upstream release.
* Upstream ChangeLog:
  - Enable the Indicator-Generic by default on a Cairo-Dock session under
    Ubuntu
  - Removed the deprecated option 'hide on fullscreen'
  - Task: fixed a bug in cairo_dock_stop_task
  - BSD port: fixed some compilation and linking problems
  - Taskbar: fixed a bug where an icon didn't stop demanding the attention
  - Docks: when changing the alignment of the main dock, correctly update
    the dock
  - Removed the need for pangox (was not used)
  - Drop on container: add URI target before the text target, or we will
    get the link text instead of the link URI in Konqueror (other browsers
    don't have this problem)
  - If an applet crashed the dock when launching it, this applet was
    not blacklisted
  - GUI: fixed a crash in the ModuleWidget class
  - Core: separated gldi-config.h in 2 parts, so that the one that is
    installed doesn't contain any architecture-dependant value
  - po: Imported translations from Launchpad
* debian/control:
  - Mutter is now better supported by the dock: added on the recommended
    list
* debian/rules:
  - CMake flag: replaced 'yes' by 'ON'

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
                        int n = res->ncrtc;
183
183
                        cd_debug (" number of screen(s): %d", n);
184
184
                        pScreens = g_new0 (GtkAllocation, n);
185
 
                        int i, iSkippedScreens = 0;
 
185
                        int i;
186
186
                        for (i = 0; i < n; i++)
187
187
                        {
188
188
                                XRRCrtcInfo *info = XRRGetCrtcInfo (s_XDisplay, res, res->crtcs[i]);
189
 
                                if (info == NULL || info->width == 0 || info->height == 0)
190
 
                                {
191
 
                                        if (info == NULL)
192
 
                                                cd_warning ("This screen (%d) has no info, skip it.", i);
193
 
                                        else
194
 
                                        {
195
 
                                                cd_message ("This screen (%d) has a null dimensions, skip it.", i); // it's "normal"
196
 
                                                XRRFreeCrtcInfo (info);
197
 
                                        }
198
 
                                        iSkippedScreens++; // we have to skip this screen and reduce pScreens
199
 
                                        pScreens = g_renew (GtkAllocation, pScreens, n - iSkippedScreens);
200
 
                                        continue;
201
 
                                }
202
 
                                
203
 
                                pScreen = &pScreens[i-iSkippedScreens];
 
189
                                if (info == NULL)
 
190
                                {
 
191
                                        cd_warning ("This screen (%d) has no info, skip it.", i);
 
192
                                        continue;
 
193
                                }
 
194
                                
 
195
                                if (info->width == 0 || info->height == 0)
 
196
                                {
 
197
                                        cd_debug ("This screen (%d) has a null dimensions, skip it.", i);  // seems normal behaviour of xrandr, so no warning
 
198
                                        XRRFreeCrtcInfo (info);
 
199
                                        continue;
 
200
                                }
 
201
                                
 
202
                                pScreen = &pScreens[iNbScreens];
204
203
                                pScreen->x = info->x;
205
204
                                pScreen->y = info->y;
206
205
                                pScreen->width = info->width;
207
206
                                pScreen->height = info->height;
208
 
                                cd_message (" * screen %d(%d-%d) => (%d;%d) %dx%d", iNbScreens, i, iSkippedScreens, pScreen->x, pScreen->y, pScreen->width, pScreen->height);
 
207
                                cd_message (" * screen %d(%d) => (%d;%d) %dx%d", iNbScreens, i, pScreen->x, pScreen->y, pScreen->width, pScreen->height);
209
208
                                
210
209
                                XRRFreeCrtcInfo (info);
211
210
                                iNbScreens ++;
243
242
                else
244
243
                        cd_warning ("No screen found from Xinerama, is it really active ?");
245
244
        }
246
 
        #endif
247
 
#endif
 
245
        #endif  // HAVE_XINERAMA
 
246
        #endif  // HAVE_XEXTEND
248
247
        
249
248
        if (iNbScreens == 0)
250
249
        {