~unity-team/unity/yakkety

« back to all changes in this revision

Viewing changes to launcher/StorageLauncherIcon.cpp

  • Committer: Bileto Bot
  • Date: 2016-11-12 02:12:43 UTC
  • mfrom: (4194.1.4 y-sru1)
  • Revision ID: ci-train-bot@canonical.com-20161112021243-ohprcxx9s9wmn4gt
* LockScreenController: ignore icon_paths_changed signal in
  menumanager for Lockscreen (LP: #1635625)
* Properly handle the file manager copy dialog in
  FileManagerLauncherIcon and in StorageLauncherIcon. (LP: #1575452,
  LP: #1609845)
* Correctly position the force quit dialog when scaling is different
  than 1.0 (LP: #1637991)
* GnomeSession: Retrieve the session id using dbus if $XDG_SESSION_ID
  is not set (LP: #1633749)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  bool active = false;
37
37
  bool urgent = false;
38
38
  bool check_visibility = (GetIconType() == IconType::APPLICATION);
39
 
  bool visible = IsSticky();
 
39
  bool visible = false;
40
40
 
41
41
  managed_windows_ = GetStorageWindows();
42
42
  windows_connections_.Clear();
54
54
    if (!urgent && win->urgent())
55
55
      urgent = true;
56
56
 
57
 
    if (check_visibility)
58
 
    {
59
 
      windows_connections_.Add(win->visible.changed.connect([this] (bool) { OnWindowStateChanged(); }));
60
 
 
61
 
      if (!visible && win->visible())
62
 
        visible = true;
63
 
    }
 
57
    if (check_visibility && !visible)
 
58
      visible = true;
64
59
  }
65
60
 
66
61
  SetQuirk(Quirk::RUNNING, !managed_windows_.empty());
68
63
  SetQuirk(Quirk::URGENT, urgent);
69
64
 
70
65
  if (check_visibility)
71
 
    SetQuirk(Quirk::VISIBLE, visible);
 
66
    SetQuirk(Quirk::VISIBLE, visible || IsSticky());
72
67
 
73
68
  EnsureWindowsLocation();
74
69
}
83
78
  bool active = false;
84
79
  bool urgent = false;
85
80
  bool check_visibility = (GetIconType() == IconType::APPLICATION);
86
 
  bool visible = IsSticky();
 
81
  bool visible = false;
87
82
 
88
83
  for (auto const& win : managed_windows_)
89
84
  {
93
88
    if (!urgent && win->urgent())
94
89
      urgent = true;
95
90
 
96
 
    if (check_visibility && !visible && win->visible())
 
91
    if (check_visibility && !visible)
97
92
      visible = true;
98
93
  }
99
94
 
101
96
  SetQuirk(Quirk::URGENT, urgent);
102
97
 
103
98
  if (check_visibility)
104
 
    SetQuirk(Quirk::VISIBLE, visible);
 
99
    SetQuirk(Quirk::VISIBLE, visible || IsSticky());
105
100
}
106
101
 
107
102
bool StorageLauncherIcon::OnShouldHighlightOnDrag(DndData const& dnd_data)