~smspillaz/unity/unity.less-paint-insanity

« back to all changes in this revision

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

  • Committer: smspillaz
  • Date: 2012-06-12 04:30:24 UTC
  • mfrom: (2370.2.26 unity)
  • Revision ID: sam.spilsbury@canonical.com-20120612043024-wzscubj31gjetnmp
MergeĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
2188
2188
    }
2189
2189
  }
2190
2190
 
2191
 
  std::vector<Window> const& xwns = nux::XInputWindow::NativeHandleList();
2192
 
  for (unsigned int i = 0; i < xwns.size(); i++)
 
2191
  if (IsNuxWindow ())
2193
2192
  {
2194
 
    if (xwns[i] == window->id ())
2195
 
    {
2196
 
      if (uScreen->doShellRepaint &&
2197
 
          !uScreen->forcePaintOnTop () &&
2198
 
          !(mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK))
 
2193
    if (uScreen->doShellRepaint &&
 
2194
        !uScreen->forcePaintOnTop () &&
 
2195
        !(mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK))
2199
2196
#ifndef USE_MODERN_COMPIZ_GL
2200
 
        uScreen->paintDisplay (region, matrix, mask);
 
2197
      uScreen->paintDisplay (region, matrix, mask);
2201
2198
#else
2202
 
        uScreen->paintDisplay ();
 
2199
      uScreen->paintDisplay ();
2203
2200
#endif
2204
 
        /* Skip to end and don't paint */
2205
 
        gWindow->glPaintSetCurrentIndex (std::numeric_limits<unsigned int>::max ());
2206
 
        return gWindow->glPaint (attrib, matrix, emptyRegion, mask | PAINT_WINDOW_NO_CORE_INSTANCE_MASK);
2207
 
    }
 
2201
    /* Skip to end and don't paint */
 
2202
    gWindow->glPaintSetCurrentIndex (std::numeric_limits<unsigned int>::max ());
 
2203
    return gWindow->glPaint (attrib, matrix, emptyRegion, mask | PAINT_WINDOW_NO_CORE_INSTANCE_MASK);
2208
2204
  }
2209
2205
 
2210
2206
  return gWindow->glPaint(wAttrib, matrix, region, mask);
2882
2878
  hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" Drag"), _("Resize window."), shortcut::COMPIZ_MOUSE_OPTION, "resize", "initiate_button"));
2883
2879
}
2884
2880
 
 
2881
bool
 
2882
UnityWindow::IsNuxWindow ()
 
2883
{
 
2884
  return is_nux_window_;
 
2885
}
 
2886
 
2885
2887
/* Window init */
2886
2888
UnityWindow::UnityWindow(CompWindow* window)
2887
2889
  : BaseSwitchWindow (dynamic_cast<BaseSwitchScreen *> (UnityScreen::get (screen)), window)
2895
2897
  WindowInterface::setHandler(window);
2896
2898
  GLWindowInterface::setHandler(gWindow);
2897
2899
 
 
2900
  std::vector<Window> const& xwns = nux::XInputWindow::NativeHandleList();
 
2901
  for (unsigned int i = 0; i < xwns.size(); i++)
 
2902
    if (xwns[i] == window->id ())
 
2903
        is_nux_window_ = true;
 
2904
 
2898
2905
  if (UnityScreen::get (screen)->optionGetShowMinimizedWindows () &&
2899
2906
      window->mapNum ())
2900
2907
  {