Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion main/vcl/inc/unx/gtk/gtkdata.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class GtkSalDisplay : public SalDisplay
GdkDisplay* m_pGdkDisplay;
GdkCursor *m_aCursors[ POINTER_COUNT ];
bool m_bStartupCompleted;
std::vector< int > m_aXineramaScreenIndexMap;

GdkCursor* getFromXPM( const char *pBitmap, const char *pMask,
int nWidth, int nHeight, int nXHot, int nYHot );
Expand Down
53 changes: 2 additions & 51 deletions main/vcl/unx/gtk/app/gtkdata.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,61 +219,12 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
*/
InitXinerama();
(void)pScreen;

#if 0
if( pScreen )
{
if( gdk_display_get_n_screens(m_pGdkDisplay) == 1 )
{
int nScreen = gdk_screen_get_number( pScreen );
if( nScreen == m_nDefaultScreen ) //To-Do, make m_aXineramaScreens a per-screen thing ?
{
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);
m_aXineramaScreenIndexMap[i] = addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
}
m_bXinerama = m_aXineramaScreens.size() > 1;
if( ! m_aFrames.empty() )
m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, 0 );
}
else
{
DBG_ERROR( "monitors for non-default screen changed, extend-me" );
}
}
}
#endif
}

extern "C"
{
typedef gint(* screen_get_primary_monitor)(GdkScreen *screen);
}

int GtkSalDisplay::GetDefaultMonitorNumber() const
{
int n = 0;

// currently disabled, see remarks in monitorsChanged
#if 0
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
#if GTK_CHECK_VERSION(2,20,0)
n = 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)
n = sym_gdk_screen_get_primary_monitor( pScreen );
#endif
if( n >= 0 && size_t(n) < m_aXineramaScreenIndexMap.size() )
n = m_aXineramaScreenIndexMap[n];
#endif
return n;
// See remarks in monitorsChanged: Xinerama returns the default monitor as 0.
return 0;
}

void GtkSalDisplay::initScreen( int nScreen ) const
Expand Down
18 changes: 0 additions & 18 deletions main/vcl/unx/gtk/app/gtkinst.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind
return new GtkSalObject( static_cast<GtkSalFrame*>(pParent), bShow );
}

extern "C"
{
typedef void*(* getDefaultFnc)();
typedef void(* addItemFnc)(void *, const char *);
}

void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType)
{
rtl::OString sGtkURL;
Expand All @@ -229,21 +223,9 @@ void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
sGtkURL = rtl::OString(g_uri);
g_free(g_uri);
}
#if GTK_CHECK_VERSION(2,10,0)
GtkRecentManager *manager = gtk_recent_manager_get_default ();
gtk_recent_manager_add_item( manager, sGtkURL.getStr());
(void)rMimeType;
#else
static getDefaultFnc sym_gtk_recent_manager_get_default =
(getDefaultFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_get_default" );

static addItemFnc sym_gtk_recent_manager_add_item =
(addItemFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_add_item");
if (sym_gtk_recent_manager_get_default && sym_gtk_recent_manager_add_item)
sym_gtk_recent_manager_add_item(sym_gtk_recent_manager_get_default(), sGtkURL);
else
X11SalInstance::AddToRecentDocumentList(rFileUrl, rMimeType);
#endif
}

GtkYieldMutex::GtkYieldMutex()
Expand Down
8 changes: 1 addition & 7 deletions main/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3580,13 +3580,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
const cairo_font_options_t* pNewOptions = NULL;
if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
{
//#if !GTK_CHECK_VERSION(2,8,1)
#if !GTK_CHECK_VERSION(2,9,0)
static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
(cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
if( gdk_screen_get_font_options != NULL )
#endif
pNewOptions = gdk_screen_get_font_options( pScreen );
pNewOptions = gdk_screen_get_font_options( pScreen );
}
aStyleSet.SetCairoFontOptions( pNewOptions );

Expand Down
7 changes: 0 additions & 7 deletions main/vcl/unx/gtk/window/gtkframe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@
#define GSM_DBUS_INTERFACE "org.gnome.SessionManager"
#endif

// make compile on gtk older than 2.10
#if GTK_MINOR_VERSION < 10
#define GDK_SUPER_MASK (1 << 26)
#define GDK_HYPER_MASK (1 << 27)
#define GDK_META_MASK (1 << 28)
#endif

using namespace com::sun::star;

int GtkSalFrame::m_nFloats = 0;
Expand Down