~aleksandr-rakov/pantheon-dock/pantheon-dock

« back to all changes in this revision

Viewing changes to lib/HideManager.vala

  • Committer: Rico Tzschichholz
  • Date: 2013-05-15 06:01:51 UTC
  • Revision ID: ricotz@ubuntu.com-20130515060151-p8w3x3je8x203t39
hidemanager: elementary - Don't obstruct dialogs of active applications

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
                                break;
223
223
                        
224
224
                        case HideType.ELEMENTARY:
225
 
                                if (DockHovered || !active_maximized_window_intersect)
 
225
                                if (DockHovered || !(active_maximized_window_intersect || dialog_windows_intersect))
226
226
                                        show ();
227
227
                                else
228
228
                                        hide ();
302
302
                
303
303
                bool windows_intersect;
304
304
                bool active_maximized_window_intersect;
 
305
                bool dialog_windows_intersect;
305
306
                Gdk.Rectangle last_window_rect;
306
307
                
307
308
                uint timer_geo;
312
313
                        var dock_rect = controller.position_manager.get_static_dock_region ();
313
314
                        
314
315
                        var intersect = false;
 
316
                        var dialog_intersect = false;
315
317
                        var active_maximized_intersect = false;
316
318
                        var screen = Wnck.Screen.get_default ();
317
319
                        var active_window = screen.get_active_window ();
332
334
                                        
333
335
                                        if (window_geometry (w).intersect (dock_rect, null)) {
334
336
                                                intersect = true;
 
337
                                                
335
338
                                                active_maximized_intersect = active_maximized_intersect || (active_window == w
336
339
                                                        && (w.is_maximized () || w.is_maximized_vertically () || w.is_maximized_horizontally ()));
337
 
                                                if (active_maximized_intersect)
 
340
                                                
 
341
                                                dialog_intersect = dialog_intersect || type == Wnck.WindowType.DIALOG;
 
342
                                                
 
343
                                                if (active_maximized_intersect && dialog_intersect)
338
344
                                                        break;
339
345
                                        }
340
346
                                }
342
348
                        if (windows_intersect != intersect)
343
349
                                windows_intersect = intersect;
344
350
                        
 
351
                        if (dialog_windows_intersect != dialog_intersect)
 
352
                                dialog_windows_intersect = dialog_intersect;
 
353
                        
345
354
                        if (active_maximized_window_intersect != active_maximized_intersect)
346
355
                                active_maximized_window_intersect = active_maximized_intersect;
347
356