~azzar1/unity/fix-855909

« back to all changes in this revision

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

  • Committer: Jason Smith
  • Date: 2011-09-23 23:02:51 UTC
  • Revision ID: jason.smith@canonical.com-20110923230251-zmi42adzcdvxk8fs
make "primary" monitor be the left most monitor, regardless of what X says...
We do this because we are more or less forced to by the design

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "PluginAdapter.h"
25
25
#include "UBusMessages.h"
 
26
#include "UScreen.h"
26
27
 
27
28
namespace unity
28
29
{
135
136
 
136
137
nux::Geometry DashController::GetIdealWindowGeometry()
137
138
{
138
 
  GdkScreen* screen = gdk_screen_get_default();
139
 
  int primary_monitor = gdk_screen_get_primary_monitor(screen);
140
 
 
141
 
  GdkRectangle monitor_geo = { 0 };
142
 
  gdk_screen_get_monitor_geometry(screen, primary_monitor, &monitor_geo);
 
139
  UScreen *uscreen = UScreen::GetDefault();
 
140
  int primary_monitor = uscreen->GetPrimaryMonitor();
 
141
  auto monitor_geo = uscreen->GetMonitorGeometry(primary_monitor);
143
142
  
144
143
  // We want to cover as much of the screen as possible to grab any mouse events outside
145
144
  // of our window