summaryrefslogtreecommitdiff
path: root/patches/dev300/vcl-netbook.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/dev300/vcl-netbook.diff')
-rw-r--r--patches/dev300/vcl-netbook.diff206
1 files changed, 0 insertions, 206 deletions
diff --git a/patches/dev300/vcl-netbook.diff b/patches/dev300/vcl-netbook.diff
deleted file mode 100644
index de3d72ed1..000000000
--- a/patches/dev300/vcl-netbook.diff
+++ /dev/null
@@ -1,206 +0,0 @@
----
- vcl/unx/gtk/window/gtkframe.cxx | 8 ++++++-
- vcl/unx/inc/wmadaptor.hxx | 7 +++++-
- vcl/unx/source/app/randrwrapper.cxx | 4 +++
- vcl/unx/source/app/wmadaptor.cxx | 37 +++++++++++++++++++++++++++++-----
- 4 files changed, 48 insertions(+), 8 deletions(-)
-
-diff --git vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
-index d47d16a..c26d85c 100644
---- vcl/unx/gtk/window/gtkframe.cxx
-+++ vcl/unx/gtk/window/gtkframe.cxx
-@@ -841,6 +841,9 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
- gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
- }
-
-+ if( getDisplay()->getWMAdaptor()->getSmallScreen() && eWinType == GTK_WINDOW_TOPLEVEL && !(nStyle & SAL_FRAME_STYLE_DIALOG ) && !(nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE ) && !(nStyle & SAL_FRAME_STYLE_TOOLWINDOW ) )
-+ bNoDecor = true;
-+
- gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
- if( bNoDecor )
- gtk_window_set_decorated( GTK_WINDOW(m_pWindow), FALSE );
-@@ -875,7 +878,6 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
- if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) )
- lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, false );
- }
--
- }
-
- GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
-@@ -1621,6 +1623,9 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
- SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
- SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
-
-+ if( getDisplay()->getWMAdaptor()->getSmallScreen() && !(m_nStyle & SAL_FRAME_STYLE_DIALOG) && !(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE ) && !(m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW ) )
-+ gtk_window_maximize( GTK_WINDOW(m_pWindow) );
-+ else {
- if( (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) &&
- ! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) &&
- (pState->mnState & SAL_FRAMESTATE_MAXIMIZED) &&
-@@ -1687,6 +1692,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
- gtk_window_deiconify( GTK_WINDOW(m_pWindow) );
- }
- }
-+}
-
- BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
- {
-diff --git vcl/unx/inc/wmadaptor.hxx vcl/unx/inc/wmadaptor.hxx
-index 18c96ae..dfe6f3e 100644
---- vcl/unx/inc/wmadaptor.hxx
-+++ vcl/unx/inc/wmadaptor.hxx
-@@ -50,6 +50,7 @@ class VCL_DLLPUBLIC WMAdaptor
- public:
- enum WMAtom {
- // atoms for types
-+ STRING,
- UTF8_STRING,
-
- // atoms for extended WM hints
-@@ -123,6 +124,7 @@ public:
- XSETTINGS,
- XEMBED,
- XEMBED_INFO,
-+ MOBLIN,
- NetAtomMax
- };
-
-@@ -155,6 +157,7 @@ protected:
- SalDisplay* m_pSalDisplay; // Display to use
- Display* m_pDisplay; // X Display of SalDisplay
- String m_aWMName;
-+ bool m_bSmallScreen;
- Atom m_aWMAtoms[ NetAtomMax];
- int m_nDesktops;
- bool m_bEqualWorkAreas;
-@@ -169,7 +172,7 @@ protected:
- WMAdaptor( SalDisplay * )
- ;
- void initAtoms();
-- bool getNetWmName();
-+ bool getNetWmNameAndHints();
-
- /*
- * returns whether this instance is useful
-@@ -343,6 +346,8 @@ public:
- * if reference frame is NULL the root window is used instead
- */
- void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const;
-+
-+ bool getSmallScreen() const { return m_bSmallScreen; }
- };
-
- } // namespace
-diff --git vcl/unx/source/app/randrwrapper.cxx vcl/unx/source/app/randrwrapper.cxx
-index 7662e47..bc81e55 100644
---- vcl/unx/source/app/randrwrapper.cxx
-+++ vcl/unx/source/app/randrwrapper.cxx
-@@ -34,6 +34,10 @@
- #include "osl/module.h"
- #include "rtl/ustring.hxx"
-
-+#if OSL_DEBUG_LEVEL > 1
-+#include <stdio.h>
-+#endif
-+
- namespace
- {
-
-diff --git vcl/unx/source/app/wmadaptor.cxx vcl/unx/source/app/wmadaptor.cxx
-index c771dc9..b7f47f1 100644
---- vcl/unx/source/app/wmadaptor.cxx
-+++ vcl/unx/source/app/wmadaptor.cxx
-@@ -234,6 +234,7 @@ WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
-
- WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
- m_pSalDisplay( pDisplay ),
-+ m_bSmallScreen( false ),
- m_bTransientBehaviour( true ),
- m_bEnableAlwaysOnTopWorks( false ),
- m_bLegacyPartialFullscreen( false ),
-@@ -256,7 +257,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
- m_pDisplay = m_pSalDisplay->GetDisplay();
-
- initAtoms();
-- getNetWmName(); // try to discover e.g. Sawfish
-+ getNetWmNameAndHints(); // try to discover e.g. Sawfish
-
- // check for dtwm running
- if( m_aWMAtoms[ DTWM_IS_RUNNING ] )
-@@ -436,7 +437,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
- initAtoms();
-
- // check for NetWM
-- bNetWM = getNetWmName();
-+ bNetWM = getNetWmNameAndHints();
- if( bNetWM
- && XGetWindowProperty( m_pDisplay,
- m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-@@ -682,7 +683,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
- * already supports this part of the extended WM hints
- */
- m_aWMAtoms[ UTF8_STRING ] = XInternAtom( m_pDisplay, "UTF8_STRING", False );
-- getNetWmName();
-+ getNetWmNameAndHints();
- }
- }
- m_pSalDisplay->GetXLib()->PopXErrorLevel();
-@@ -821,9 +822,9 @@ GnomeWMAdaptor::~GnomeWMAdaptor()
- }
-
- /*
-- * getNetWmName()
-+ * getNetWmNameAndHints()
- */
--bool WMAdaptor::getNetWmName()
-+bool WMAdaptor::getNetWmNameAndHints()
- {
- Atom aRealType = None;
- int nFormat = 8;
-@@ -904,11 +905,34 @@ bool WMAdaptor::getNetWmName()
- {
- m_aWMName = String( (sal_Char*)pProperty, nItems, RTL_TEXTENCODING_ISO_8859_1 );
- }
-+ }
-
-+ if( pProperty )
-+ {
- XFree( pProperty );
- pProperty = NULL;
- }
-- else if( pProperty )
-+
-+ m_aWMAtoms[ STRING ] = XInternAtom( m_pDisplay, "STRING", False );
-+ if( XGetWindowProperty( m_pDisplay,
-+ aWMChild,
-+ m_aWMAtoms[ MOBLIN ],
-+ 0, 256,
-+ False,
-+ m_aWMAtoms[ STRING ],
-+ &aRealType,
-+ &nFormat,
-+ &nItems,
-+ &nBytesLeft,
-+ &pProperty ) == 0 )
-+ {
-+ if ( (sal_Char*) pProperty && strstr( (sal_Char*) pProperty, "session-type=small-screen") )
-+ {
-+ m_bSmallScreen = true;
-+ }
-+ }
-+
-+ if( pProperty )
- {
- XFree( pProperty );
- pProperty = NULL;
-@@ -1009,6 +1033,7 @@ void WMAdaptor::initAtoms()
- m_aWMAtoms[ aAtomTab[i].nProtocol ] = XInternAtom( m_pDisplay, aAtomTab[i].pProtocol, False );
- m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True );
- m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True );
-+ m_aWMAtoms[ MOBLIN ] = XInternAtom( m_pDisplay, "_MOBLIN", True );
- }
-
- /*
---
-1.7.0.1
-