[Libreoffice-commits] .: 4 commits -
Petr Mladek
pmladek at kemper.freedesktop.org
Fri Oct 8 13:51:35 PDT 2010
0 files changed
New commits:
commit 2941d52758dd15b23191fb6b6a1bd1ea6809d414
Merge: 97cba961... fb2b195...
Author: Petr Mladek <pmladek at suse.cz>
Date: Fri Oct 8 22:48:57 2010 +0200
Merge branch 'master' of ssh://pmladek@git.freedesktop.org/git/libreoffice/libs-gui
commit 97cba961d8a4577b65fd83782fea5da3e6bab344
Author: Petr Mladek <pmladek at suse.cz>
Date: Fri Oct 8 18:44:34 2010 +0200
Version 3.2.99.2, tag LIBREOFFICE_3_2_99_2 (3.3-beta2)
commit 350d4c21de8d159d5817087ec59dbfb5591d6495
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Fri Oct 8 18:32:39 2010 +0200
Revert "i#112421# make Presenter Screen default to the laptop, not projector"
This reverts commit dbbfe692dfbde95f0a21997dd8f88fd009286964.
This crashes with anything but GNOME (try OOO_FORCE_DESKTOP=none).
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 10b1c43..fd08974 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -217,12 +217,11 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
{
gint nMonitors = gdk_screen_get_n_monitors(pScreen);
m_aXineramaScreens = std::vector<Rectangle>();
- m_aXineramaScreenIndexMap = std::vector<int>(nMonitors);
for (gint i = 0; i < nMonitors; ++i)
{
GdkRectangle dest;
gdk_screen_get_monitor_geometry(pScreen, i, &dest);
- addXineramaScreenUnique( i, dest.x, dest.y, dest.width, dest.height );
+ addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
}
m_bXinerama = m_aXineramaScreens.size() > 1;
if( ! m_aFrames.empty() )
@@ -236,32 +235,6 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
}
}
-extern "C"
-{
- typedef gint(* screen_get_primary_monitor)(GdkScreen *screen);
-}
-
-int GtkSalDisplay::GetDefaultMonitorNumber() const
-{
- GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
-#if GTK_CHECK_VERSION(2,20,0)
- return m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)];
-#else
- static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor =
- (screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
- if (sym_gdk_screen_get_primary_monitor)
- return sym_gdk_screen_get_primary_monitor( pScreen );
- //gdk_screen_get_primary_monitor unavailable, take the first laptop monitor as the default
- gint nMonitors = gdk_screen_get_n_monitors(pScreen);
- for (gint i = 0; i < nMonitors; ++i)
- {
- if (g_ascii_strncasecmp (gdk_screen_get_monitor_plug_name(pScreen, i), "LVDS", 4) == 0)
- return m_aXineramaScreenIndexMap[i];
- }
- return 0;
-#endif
-}
-
void GtkSalDisplay::initScreen( int nScreen ) const
{
if( nScreen < 0 || nScreen >= static_cast<int>(m_aScreens.size()) )
diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
index 118b7da..3ce837c 100644
--- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
@@ -73,8 +73,6 @@ public:
virtual long Dispatch( XEvent *pEvent );
virtual void initScreen( int nScreen ) const;
- virtual int GetDefaultMonitorNumber() const;
-
static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event,
GdkEvent* event,
gpointer data );
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 99d1a16..313785d 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -386,7 +386,6 @@ protected:
bool m_bXinerama;
std::vector< Rectangle > m_aXineramaScreens;
- std::vector< int > m_aXineramaScreenIndexMap;
std::list<SalFrame*> m_aFrames;
std::list<SalObject*> m_aSalObjects;
@@ -402,7 +401,7 @@ protected:
int processRandREvent( XEvent* );
void doDestruct();
- void addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight );
+ void addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
public:
static SalDisplay *GetSalDisplay( Display* display );
static BOOL BestVisual( Display *pDisp,
@@ -474,7 +473,6 @@ public:
XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
Display *GetDisplay() const { return pDisp_; }
int GetDefaultScreenNumber() const { return m_nDefaultScreen; }
- virtual int GetDefaultMonitorNumber() const { return 0; }
const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
srv_vendor_t GetServerVendor() const { return meServerVendor; }
void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 2742bfa..50a37f9 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2682,7 +2682,7 @@ void SalDisplay::PrintInfo() const
sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) );
}
-void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight )
+void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
{
// see if any frame buffers are at the same coordinates
// this can happen with weird configuration e.g. on
@@ -2696,13 +2696,11 @@ void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nW
if( m_aXineramaScreens[n].GetWidth() < i_nWidth ||
m_aXineramaScreens[n].GetHeight() < i_nHeight )
{
- m_aXineramaScreenIndexMap[i] = n;
m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
}
return;
}
}
- m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size();
m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
}
@@ -2730,7 +2728,7 @@ void SalDisplay::InitXinerama()
m_bXinerama = true;
m_aXineramaScreens = std::vector<Rectangle>();
for( int i = 0; i < nFramebuffers; i++ )
- addXineramaScreenUnique( i, pFramebuffers[i].x,
+ addXineramaScreenUnique( pFramebuffers[i].x,
pFramebuffers[i].y,
pFramebuffers[i].width,
pFramebuffers[i].height );
@@ -2748,7 +2746,7 @@ if( XineramaIsActive( pDisp_ ) )
m_aXineramaScreens = std::vector<Rectangle>();
for( int i = 0; i < nFramebuffers; i++ )
{
- addXineramaScreenUnique( i, pScreens[i].x_org,
+ addXineramaScreenUnique( pScreens[i].x_org,
pScreens[i].y_org,
pScreens[i].width,
pScreens[i].height );
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 93a327c..82bf2ec 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -71,7 +71,7 @@ bool X11SalSystem::IsMultiDisplay()
unsigned int X11SalSystem::GetDefaultDisplayNumber()
{
SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- return pSalDisp->IsXinerama() ? pSalDisp->GetDefaultMonitorNumber() : pSalDisp->GetDefaultScreenNumber();
+ return pSalDisp->GetDefaultScreenNumber();
}
Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
commit c2dadf8389f69d0a8529e02452c0eefa77e76821
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Fri Oct 8 18:32:26 2010 +0200
Revert "gdk_screen_get_monitor_plug_name needs at least 2.14"
This reverts commit d53ac3474f8aa7596f34af67ff2be316e26a1542.
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index fe12691..10b1c43 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -251,16 +251,13 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const
(screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
if (sym_gdk_screen_get_primary_monitor)
return sym_gdk_screen_get_primary_monitor( pScreen );
-#if GTK_CHECK_VERSION(2,14,0)
- //gdk_screen_get_primary_monitor unavailable, take the first laptop monitor
- //as the default. This fallback needs at least gtk 2.14.0
+ //gdk_screen_get_primary_monitor unavailable, take the first laptop monitor as the default
gint nMonitors = gdk_screen_get_n_monitors(pScreen);
for (gint i = 0; i < nMonitors; ++i)
{
if (g_ascii_strncasecmp (gdk_screen_get_monitor_plug_name(pScreen, i), "LVDS", 4) == 0)
return m_aXineramaScreenIndexMap[i];
}
-#endif
return 0;
#endif
}
More information about the Libreoffice-commits
mailing list