~sil2100/unity/launcher_dnd_flicker_5.0

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/Launcher.cpp

  • Committer: Łukasz 'sil2100' Zemczak
  • Date: 2012-06-06 09:25:29 UTC
  • Revision ID: lukasz.zemczak@canonical.com-20120606092529-t4eqnnveeuvwjty9
When dragging a non-application, do not saturate all icons automatically, but only those that are needed.
   
Eliminates flickering before 'prelighting' the Launcher icons that can handle the current drag-and-drop (LP #863230)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2696
2696
 
2697
2697
  _hide_machine->SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, true);
2698
2698
 
2699
 
  if (IsOverlayOpen())
2700
 
    SaturateIcons();
2701
 
 
2702
2699
  for (auto it : _dnd_data.Uris())
2703
2700
  {
2704
2701
    if (g_str_has_suffix(it.c_str(), ".desktop"))
2713
2710
    for (auto it : *_model)
2714
2711
    {
2715
2712
      if (it->ShouldHighlightOnDrag(_dnd_data))
 
2713
      {
 
2714
        it->SetQuirk(AbstractLauncherIcon::QUIRK_DESAT, false);
2716
2715
        it->SetQuirk(AbstractLauncherIcon::QUIRK_DROP_PRELIGHT, true);
 
2716
      }
2717
2717
      else
 
2718
      {
2718
2719
        it->SetQuirk(AbstractLauncherIcon::QUIRK_DROP_DIM, true);
 
2720
      }
2719
2721
    }
2720
2722
  }
 
2723
  else
 
2724
  {
 
2725
    if (IsOverlayOpen())
 
2726
      SaturateIcons();
 
2727
  }
2721
2728
}
2722
2729
 
2723
2730
void