~helene-verhaeghe27/cairo-dock-core/bugfix

« back to all changes in this revision

Viewing changes to src/cairo-dock-internal-accessibility.c

  • Committer: fabounet
  • Date: 2010-04-18 11:42:02 UTC
  • Revision ID: fabounet03@gmail.com-20100418114202-4dgp7l3vbcage8if
modified the auto-hide when a window covers the dock + removed automake files

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "cairo-dock-dialog-manager.h"
30
30
#include "cairo-dock-animations.h"
31
31
#include "cairo-dock-applications-manager.h"
 
32
#include "cairo-dock-application-facility.h"
32
33
#define _INTERNAL_MODULE_
33
34
#include "cairo-dock-internal-accessibility.h"
34
35
#include "cairo-dock-dock-facility.h"
57
58
                                pAccessibility->bAutoHide = g_key_file_get_boolean (pKeyFile, "Accessibility", "auto-hide", NULL);
58
59
                                if (! pAccessibility->bAutoHide)
59
60
                                {
60
 
                                        pAccessibility->bAutoHideOnMaximized = g_key_file_get_boolean (pKeyFile, "Accessibility", "auto quick hide on max", NULL);
61
 
                                        if (pAccessibility->bAutoHideOnMaximized)
 
61
                                        pAccessibility->bAutoHideOnOverlap = g_key_file_get_boolean (pKeyFile, "Accessibility", "auto quick hide on max", NULL);
 
62
                                        if (pAccessibility->bAutoHideOnOverlap)
62
63
                                                iAccessibility = 4;
63
64
                                        else if (cShortkey)
64
65
                                        {
94
95
                                pAccessibility->bAutoHide = TRUE;
95
96
                        break;
96
97
                        case 4 :
97
 
                                pAccessibility->bAutoHideOnMaximized = TRUE;
 
98
                                pAccessibility->bAutoHideOnOverlap = TRUE;
98
99
                        break;
99
100
                        case 5 :
100
101
                                pAccessibility->cRaiseDockShortcut = cShortkey;
225
226
        //\_______________ Auto-Hide
226
227
        if (pDock)
227
228
        {
 
229
                if (pAccessibility->bAutoHideOnFullScreen != pPrevAccessibility->bAutoHideOnFullScreen ||
 
230
                        pAccessibility->bAutoHideOnOverlap != pPrevAccessibility->bAutoHideOnOverlap)
 
231
                {
 
232
                        Icon *pActiveAppli = cairo_dock_get_current_active_icon ();
 
233
                        if (!_cairo_dock_appli_is_on_our_way (pActiveAppli, pDock))
 
234
                        {
 
235
                                if (cairo_dock_quick_hide_is_activated () && !pDock->bAutoHide)
 
236
                                {
 
237
                                        cd_message (" => aucune fenetre n'est desormais genante");
 
238
                                        cairo_dock_deactivate_temporary_auto_hide ();
 
239
                                }
 
240
                        }
 
241
                        else
 
242
                        {
 
243
                                if (! cairo_dock_quick_hide_is_activated ())
 
244
                                {
 
245
                                        cd_message (" => une fenetre desormais genante");
 
246
                                        cairo_dock_activate_temporary_auto_hide ();
 
247
                                }
 
248
                        }
 
249
                        /**if ((!pAccessibility->bAutoHideOnOverlap && ! pAccessibility->bAutoHideOnFullScreen) || cairo_dock_search_window_on_our_way (pDock, pAccessibility->bAutoHideOnMaximized, pAccessibility->bAutoHideOnFullScreen) == NULL)
 
250
                        {
 
251
                                if (cairo_dock_quick_hide_is_activated () && !pDock->bAutoHide)
 
252
                                {
 
253
                                        cd_message (" => aucune fenetre n'est desormais genante");
 
254
                                        cairo_dock_deactivate_temporary_auto_hide ();
 
255
                                }
 
256
                        }
 
257
                        else
 
258
                        {
 
259
                                if (! cairo_dock_quick_hide_is_activated ())
 
260
                                {
 
261
                                        cd_message (" => une fenetre desormais genante");
 
262
                                        cairo_dock_activate_temporary_auto_hide ();
 
263
                                }
 
264
                        }*/
 
265
                }
 
266
                
228
267
                if (! pAccessibility->bAutoHide && pPrevAccessibility->bAutoHide)
229
268
                {
230
 
                        pDock->bAutoHide = pAccessibility->bAutoHide;
 
269
                        pDock->bAutoHideInitialValue = pDock->bAutoHide = pAccessibility->bAutoHide;
231
270
                        cairo_dock_start_showing (pDock);
232
271
                }
233
272
                else if (pAccessibility->bAutoHide && ! pPrevAccessibility->bAutoHide)
234
273
                {
235
 
                        pDock->bAutoHide = pAccessibility->bAutoHide;
 
274
                        pDock->bAutoHideInitialValue = pDock->bAutoHide = pAccessibility->bAutoHide;
236
275
                        cairo_dock_start_hiding (pDock);
237
276
                }
238
 
                
239
 
                if (pAccessibility->bAutoHideOnFullScreen != pPrevAccessibility->bAutoHideOnFullScreen ||
240
 
                        pAccessibility->bAutoHideOnMaximized != pPrevAccessibility->bAutoHideOnMaximized)
241
 
                {
242
 
                        if ((!pAccessibility->bAutoHideOnMaximized && ! pAccessibility->bAutoHideOnFullScreen) || cairo_dock_search_window_on_our_way (pDock, pAccessibility->bAutoHideOnMaximized, pAccessibility->bAutoHideOnFullScreen) == NULL)
243
 
                        {
244
 
                                if (cairo_dock_quick_hide_is_activated () && !pDock->bAutoHide)
245
 
                                {
246
 
                                        cd_message (" => aucune fenetre n'est desormais genante");
247
 
                                        cairo_dock_deactivate_temporary_auto_hide ();
248
 
                                }
249
 
                        }
250
 
                        else
251
 
                        {
252
 
                                if (! cairo_dock_quick_hide_is_activated ())
253
 
                                {
254
 
                                        cd_message (" => une fenetre desormais genante");
255
 
                                        cairo_dock_activate_temporary_auto_hide ();
256
 
                                }
257
 
                        }
258
 
                }
259
277
        }
260
278
}
261
279