[ooo-build-commit] .: 3 commits - patches/dev300
Radek DoulÃk
rodo at kemper.freedesktop.org
Wed Aug 11 01:37:58 PDT 2010
patches/dev300/apply | 3
patches/dev300/netbook-window-decoration-update.diff | 338 +++++++++++++++++++
2 files changed, 341 insertions(+)
New commits:
commit 3ca205c1e6dde77458578bfef0f6b9959f1cb47d
Author: Radek Doulik <rodo at novell.com>
Date: Wed Aug 11 10:19:27 2010 +0200
updated to m2 once more
* patches/dev300/netbook-window-decoration-update.diff:
diff --git a/patches/dev300/netbook-window-decoration-update.diff b/patches/dev300/netbook-window-decoration-update.diff
index 00cdec4..8acbb1a 100644
--- a/patches/dev300/netbook-window-decoration-update.diff
+++ b/patches/dev300/netbook-window-decoration-update.diff
@@ -326,3 +326,13 @@ diff -rup toolkit-orig/source/awt/vclxtoolkit.cxx toolkit/source/awt/vclxtoolkit
}
return nWinBits;
+diff -rup vcl-orig-1/source/window/window3.cxx vcl/source/window/window3.cxx
+--- vcl-orig-1/source/window/window3.cxx 2010-08-09 18:30:04.000000000 +0200
++++ vcl/source/window/window3.cxx 2010-08-09 18:30:45.000000000 +0200
+@@ -84,5 +84,5 @@ void Window::ImplAdjustNWFSizes()
+
+ BOOL Window::GetSmallScreenMode()
+ {
+- return ImplGetFrame()->GetSmallScreenMode();
++ return ImplGetFrame()->IsInSmallScreenMode();
+ }
commit e3bcf46e47e701c5e65993550d12ad3ebd3924c7
Author: Radek Doulik <rodo at novell.com>
Date: Mon Aug 9 17:49:20 2010 +0200
updated for m2
* patches/dev300/netbook-window-decoration-update.diff:
diff --git a/patches/dev300/netbook-window-decoration-update.diff b/patches/dev300/netbook-window-decoration-update.diff
index 23db6fb..00cdec4 100644
--- a/patches/dev300/netbook-window-decoration-update.diff
+++ b/patches/dev300/netbook-window-decoration-update.diff
@@ -1,6 +1,6 @@
diff -rup vcl-orig/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx
---- vcl-orig/inc/vcl/salframe.hxx 2010-07-22 12:30:37.000000000 +0200
-+++ vcl/inc/vcl/salframe.hxx 2010-07-22 13:01:27.000000000 +0200
+--- vcl-orig/inc/vcl/salframe.hxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/inc/vcl/salframe.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -294,7 +294,7 @@ public:
long CallCallback( USHORT nEvent, const void* pEvent ) const
{ return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; }
@@ -11,8 +11,8 @@ diff -rup vcl-orig/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx
diff -rup vcl-orig/inc/vcl/salsys.hxx vcl/inc/vcl/salsys.hxx
---- vcl-orig/inc/vcl/salsys.hxx 2010-07-22 12:30:37.000000000 +0200
-+++ vcl/inc/vcl/salsys.hxx 2010-07-22 12:47:49.000000000 +0200
+--- vcl-orig/inc/vcl/salsys.hxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/inc/vcl/salsys.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -66,6 +66,13 @@ public:
// get info about the display
@@ -28,8 +28,8 @@ diff -rup vcl-orig/inc/vcl/salsys.hxx vcl/inc/vcl/salsys.hxx
@returns the number of active screens
diff -rup vcl-orig/inc/vcl/svapp.hxx vcl/inc/vcl/svapp.hxx
---- vcl-orig/inc/vcl/svapp.hxx 2010-07-22 12:30:37.000000000 +0200
-+++ vcl/inc/vcl/svapp.hxx 2010-07-22 12:47:59.000000000 +0200
+--- vcl-orig/inc/vcl/svapp.hxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/inc/vcl/svapp.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -369,6 +369,7 @@ public:
static void SetDisplayName( const UniString& rDisplayName );
static UniString GetDisplayName();
@@ -39,8 +39,8 @@ diff -rup vcl-orig/inc/vcl/svapp.hxx vcl/inc/vcl/svapp.hxx
// IsMultiDisplay returns:
// true: different screens are separate and windows cannot be moved
diff -rup vcl-orig/source/app/svapp.cxx vcl/source/app/svapp.cxx
---- vcl-orig/source/app/svapp.cxx 2010-07-22 12:30:37.000000000 +0200
-+++ vcl/source/app/svapp.cxx 2010-07-22 12:48:23.000000000 +0200
+--- vcl-orig/source/app/svapp.cxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/source/app/svapp.cxx 2010-08-09 17:37:17.000000000 +0200
@@ -1363,6 +1363,12 @@ UniString Application::GetDisplayName()
// -----------------------------------------------------------------------
@@ -55,37 +55,19 @@ diff -rup vcl-orig/source/app/svapp.cxx vcl/source/app/svapp.cxx
{
SalSystem* pSys = ImplGetSalSystem();
diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
---- vcl-orig/unx/gtk/window/gtkframe.cxx 2010-07-22 16:36:28.000000000 +0200
-+++ vcl/unx/gtk/window/gtkframe.cxx 2010-08-06 15:05:57.000000000 +0200
-@@ -807,17 +807,11 @@ void GtkSalFrame::Init( SalFrame* pParen
- ( ! (nStyle & SAL_FRAME_STYLE_FLOAT) ||
- (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE) ) );
-
--
- if( bDecoHandling )
- {
- bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
-- GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
--
-- //if( Application::IsInSmallScreenMode() && bNoDecor ) {
-- nStyle |= SAL_FRAME_STYLE_SIZEABLE;
-- m_nStyle |= SAL_FRAME_STYLE_SIZEABLE;
-- //}
-
-+ GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
- if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
- eType = GDK_WINDOW_TYPE_HINT_DIALOG;
- if( (nStyle & SAL_FRAME_STYLE_INTRO) )
-@@ -848,8 +842,6 @@ void GtkSalFrame::Init( SalFrame* pParen
+--- vcl-orig/unx/gtk/window/gtkframe.cxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/gtk/window/gtkframe.cxx 2010-08-09 17:41:36.000000000 +0200
+@@ -840,9 +840,6 @@ void GtkSalFrame::Init( SalFrame* pParen
+ eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
}
- OSL_TRACE("eWinType: %d eType: %d style: %d", eWinType, eType, nStyle);
+-
- if( GetSmallScreenMode() && 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 )
-@@ -1004,6 +996,14 @@ void GtkSalFrame::SetExtendedFrameStyle(
+@@ -997,6 +994,14 @@ void GtkSalFrame::SetExtendedFrameStyle(
X11SalData::getFrameResName( m_nExtStyle ),
X11SalData::getFrameClassName() );
}
@@ -100,18 +82,17 @@ diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
}
-@@ -1630,10 +1630,6 @@ void GtkSalFrame::SetWindowState( const
+@@ -1623,9 +1628,6 @@ void GtkSalFrame::SetWindowState( const
SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
-- OSL_TRACE("style: %d", m_nStyle);
- if( GetSmallScreenMode() && !(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) &&
-@@ -1681,10 +1677,13 @@ void GtkSalFrame::SetWindowState( const
+@@ -1673,10 +1675,13 @@ void GtkSalFrame::SetWindowState( const
}
if( pState->mnMask & SAL_FRAMESTATE_MASK_STATE && ! isChild() )
{
@@ -127,79 +108,7 @@ diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
/* #i42379# there is no rollup state in GDK; and rolled up windows are
* (probably depending on the WM) reported as iconified. If we iconify a
* window here that was e.g. a dialog, then it will be unmapped but still
-@@ -1700,7 +1699,6 @@ void GtkSalFrame::SetWindowState( const
- gtk_window_deiconify( GTK_WINDOW(m_pWindow) );
- }
- }
--}
-
- BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
- {
-@@ -3784,9 +3782,9 @@ gboolean GtkSalFrame::IMHandler::signalI
- return FALSE;
- }
-
--BOOL GtkSalFrame::GetSmallScreenMode()
-+BOOL GtkSalFrame::IsInSmallScreenMode()
- {
-- return getDisplay()->getWMAdaptor()->getSmallScreen();
-+ return getDisplay()->getWMAdaptor()->isInSmallScreenMode();
- }
-
- gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
-diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx~ vcl/unx/gtk/window/gtkframe.cxx~
---- vcl-orig/unx/gtk/window/gtkframe.cxx~ 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/gtk/window/gtkframe.cxx~ 2010-08-05 13:44:54.000000000 +0200
-@@ -810,6 +810,13 @@ void GtkSalFrame::Init( SalFrame* pParen
- if( bDecoHandling )
- {
- bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
-+
-+ if ( bNoDecor && Application::IsInSmallScreenMode() ) {
-+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
-+ m_nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ;
-+ nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE;
-+ }
-+
- GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
- if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
- eType = GDK_WINDOW_TYPE_HINT_DIALOG;
-@@ -841,8 +848,6 @@ void GtkSalFrame::Init( SalFrame* pParen
- gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
- }
- OSL_TRACE("eWinType: %d eType: %d style: %d", eWinType, eType, nStyle);
-- if( GetSmallScreenMode() && 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 )
-@@ -1623,10 +1628,6 @@ void GtkSalFrame::SetWindowState( const
- SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
- SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
-
-- OSL_TRACE("style: %d", m_nStyle);
-- if( GetSmallScreenMode() && !(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) &&
-@@ -1674,10 +1675,13 @@ void GtkSalFrame::SetWindowState( const
- }
- if( pState->mnMask & SAL_FRAMESTATE_MASK_STATE && ! isChild() )
- {
-+ OSL_TRACE("unmaximize?");
- if( pState->mnState & SAL_FRAMESTATE_MAXIMIZED )
- gtk_window_maximize( GTK_WINDOW(m_pWindow) );
-- else
-+ else {
- gtk_window_unmaximize( GTK_WINDOW(m_pWindow) );
-+ OSL_TRACE("unmaximize");
-+ }
- /* #i42379# there is no rollup state in GDK; and rolled up windows are
- * (probably depending on the WM) reported as iconified. If we iconify a
- * window here that was e.g. a dialog, then it will be unmapped but still
-@@ -1693,7 +1697,6 @@ void GtkSalFrame::SetWindowState( const
+@@ -1692,7 +1697,6 @@ void GtkSalFrame::SetWindowState( const
gtk_window_deiconify( GTK_WINDOW(m_pWindow) );
}
}
@@ -207,7 +116,7 @@ diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx~ vcl/unx/gtk/window/gtkframe.cxx~
BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
{
-@@ -3777,9 +3780,9 @@ gboolean GtkSalFrame::IMHandler::signalI
+@@ -3776,9 +3780,9 @@ gboolean GtkSalFrame::IMHandler::signalI
return FALSE;
}
@@ -220,8 +129,8 @@ diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx~ vcl/unx/gtk/window/gtkframe.cxx~
gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
diff -rup vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkframe.hxx
---- vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 2010-07-22 13:03:17.000000000 +0200
+--- vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -394,7 +394,7 @@ public:
static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
@@ -232,8 +141,8 @@ diff -rup vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkf
diff -rup vcl-orig/unx/inc/salsys.h vcl/unx/inc/salsys.h
---- vcl-orig/unx/inc/salsys.h 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/inc/salsys.h 2010-07-22 12:51:27.000000000 +0200
+--- vcl-orig/unx/inc/salsys.h 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/inc/salsys.h 2010-08-09 17:37:17.000000000 +0200
@@ -48,6 +48,7 @@ public:
virtual ~X11SalSystem();
@@ -243,8 +152,8 @@ diff -rup vcl-orig/unx/inc/salsys.h vcl/unx/inc/salsys.h
virtual bool IsMultiDisplay();
virtual unsigned int GetDefaultDisplayNumber();
diff -rup vcl-orig/unx/inc/wmadaptor.hxx vcl/unx/inc/wmadaptor.hxx
---- vcl-orig/unx/inc/wmadaptor.hxx 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/inc/wmadaptor.hxx 2010-07-22 12:59:45.000000000 +0200
+--- vcl-orig/unx/inc/wmadaptor.hxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/inc/wmadaptor.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -347,7 +347,7 @@ public:
*/
void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const;
@@ -255,8 +164,8 @@ diff -rup vcl-orig/unx/inc/wmadaptor.hxx vcl/unx/inc/wmadaptor.hxx
} // namespace
diff -rup vcl-orig/unx/source/app/salsys.cxx vcl/unx/source/app/salsys.cxx
---- vcl-orig/unx/source/app/salsys.cxx 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/source/app/salsys.cxx 2010-07-22 12:59:41.000000000 +0200
+--- vcl-orig/unx/source/app/salsys.cxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/source/app/salsys.cxx 2010-08-09 17:37:17.000000000 +0200
@@ -38,6 +38,7 @@
#include <salinst.h>
#include <saldisp.hxx>
@@ -278,8 +187,8 @@ diff -rup vcl-orig/unx/source/app/salsys.cxx vcl/unx/source/app/salsys.cxx
unsigned int X11SalSystem::GetDisplayScreenCount()
{
diff -rup vcl-orig/unx/source/app/wmadaptor.cxx vcl/unx/source/app/wmadaptor.cxx
---- vcl-orig/unx/source/app/wmadaptor.cxx 2010-07-22 12:30:35.000000000 +0200
-+++ vcl/unx/source/app/wmadaptor.cxx 2010-07-22 14:37:41.000000000 +0200
+--- vcl-orig/unx/source/app/wmadaptor.cxx 2010-08-09 17:36:47.000000000 +0200
++++ vcl/unx/source/app/wmadaptor.cxx 2010-08-09 17:37:17.000000000 +0200
@@ -234,7 +234,7 @@ WMAdaptor* WMAdaptor::createWMAdaptor( S
WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
@@ -290,8 +199,8 @@ diff -rup vcl-orig/unx/source/app/wmadaptor.cxx vcl/unx/source/app/wmadaptor.cxx
m_bEnableAlwaysOnTopWorks( false ),
m_bLegacyPartialFullscreen( false ),
diff -rup framework-orig/inc/services/taskcreatorsrv.hxx framework/inc/services/taskcreatorsrv.hxx
---- framework-orig/inc/services/taskcreatorsrv.hxx 2010-07-22 11:44:36.000000000 +0200
-+++ framework/inc/services/taskcreatorsrv.hxx 2010-07-22 11:54:34.000000000 +0200
+--- framework-orig/inc/services/taskcreatorsrv.hxx 2010-08-09 17:36:58.000000000 +0200
++++ framework/inc/services/taskcreatorsrv.hxx 2010-08-09 17:37:17.000000000 +0200
@@ -146,7 +146,8 @@ class TaskCreatorService : public css::
css::uno::Reference< css::awt::XWindow > implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
@@ -303,8 +212,8 @@ diff -rup framework-orig/inc/services/taskcreatorsrv.hxx framework/inc/services/
void implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const;
diff -rup framework-orig/source/services/taskcreatorsrv.cxx framework/source/services/taskcreatorsrv.cxx
---- framework-orig/source/services/taskcreatorsrv.cxx 2010-08-06 12:42:09.000000000 +0200
-+++ framework/source/services/taskcreatorsrv.cxx 2010-08-05 13:43:39.000000000 +0200
+--- framework-orig/source/services/taskcreatorsrv.cxx 2010-08-09 17:36:59.000000000 +0200
++++ framework/source/services/taskcreatorsrv.cxx 2010-08-09 17:38:58.000000000 +0200
@@ -46,6 +46,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
@@ -351,88 +260,23 @@ diff -rup framework-orig/source/services/taskcreatorsrv.cxx framework/source/ser
//------------------->
// create the new frame
-@@ -221,20 +227,26 @@ css::uno::Reference< css::uno::XInterfac
+@@ -221,6 +227,15 @@ css::uno::Reference< css::uno::XInterfac
if (bVisible)
xContainerWindow->setVisible(bVisible);
+ if ( bTopLevelDocumentWindow && Application::IsInSmallScreenMode() ) {
-+ css::uno::Reference< css::awt::XTopWindow2 > xTopWindow2( xContainerWindow, css::uno::UNO_QUERY );
++ css::uno::Reference< css::awt::XTopWindow2 > xTopWindow2( xContainerWindow, css::uno::UNO_QUERY );
+
-+ if ( xTopWindow2.is() ) {
-+ OSL_TRACE("maximize document window");
-+ xTopWindow2->setIsMaximized( sal_True );
-+ }
++ if ( xTopWindow2.is() ) {
++ OSL_TRACE("maximize document window");
++ xTopWindow2->setIsMaximized( sal_True );
+ }
++ }
+
return css::uno::Reference< css::uno::XInterface >(xFrame, css::uno::UNO_QUERY_THROW);
}
- //-----------------------------------------------
- void TaskCreatorService::implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const
- {
-- OSL_TRACE("set extended style to vcl");
- // SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
- Window* pVCLWindow = VCLUnoHelper::GetWindow(xWindow);
-- if (pVCLWindow) {
-+ if (pVCLWindow)
- pVCLWindow->SetExtendedStyle(WB_EXT_DOCUMENT);
-- OSL_TRACE("(done) set extended style to vcl");
-- }
- aSolarGuard.clear();
- // <- SYNCHRONIZED
- }
-@@ -242,7 +254,8 @@ void TaskCreatorService::implts_applyDoc
- //-----------------------------------------------
- css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
- const css::awt::Rectangle& aPosSize ,
-- sal_Bool bTopWindow )
-+ sal_Bool bTopWindow,
-+ sal_Bool bDocumentWindow )
- {
- // SAFE ->
- ReadGuard aReadLock( m_aLock );
-@@ -277,6 +290,9 @@ css::uno::Reference< css::awt::XWindow >
- css::awt::WindowAttribute::SIZEABLE |
- css::awt::WindowAttribute::CLOSEABLE |
- css::awt::VclWindowPeerAttribute::CLIPCHILDREN ;
-+ OSL_TRACE("style, ssm: %d doc: %d", Application::IsInSmallScreenMode(), bDocumentWindow);
-+ if (bDocumentWindow && Application::IsInSmallScreenMode() )
-+ aDescriptor.WindowAttributes |= css::awt::WindowAttribute::NODECORATION;
- }
- else
- {
-diff -rup framework-orig/source/services/taskcreatorsrv.cxx~ framework/source/services/taskcreatorsrv.cxx~
---- framework-orig/source/services/taskcreatorsrv.cxx~ 2010-07-22 11:44:31.000000000 +0200
-+++ framework/source/services/taskcreatorsrv.cxx~ 2010-07-22 14:41:24.000000000 +0200
-@@ -139,6 +139,7 @@ css::uno::Reference< css::uno::XInterfac
- static css::awt::Rectangle DEFAULTVAL_POSSIZE = css::awt::Rectangle(0, 0, 0, 0); // only possize=[0,0,0,0] triggers default handling of vcl !
- static sal_Bool DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE = sal_False;
- static sal_Bool DEFAULTVAL_ENABLE_TITLEBARUPDATE = sal_True;
-+ sal_Bool bDocumentWindow = sal_False;
-
- ::comphelper::SequenceAsHashMap lArgs(lArguments);
-
-@@ -151,6 +152,9 @@ css::uno::Reference< css::uno::XInterfac
- sal_Bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE );
- sal_Bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_ENABLE_TITLEBARUPDATE , DEFAULTVAL_ENABLE_TITLEBARUPDATE );
-
-+ if (sFrameName.compareToAscii( "_blank") == 0)
-+ bDocumentWindow = sal_True;
-+
- /* SAFE { */
- ReadGuard aReadLock( m_aLock );
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
-@@ -173,7 +177,7 @@ css::uno::Reference< css::uno::XInterfac
- if ( ! xParentWindow.is())
- bCreateTopWindow = sal_True;
-
-- xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow);
-+ xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow, bDocumentWindow);
- }
-
- //------------------->
-@@ -239,7 +243,8 @@ void TaskCreatorService::implts_applyDoc
+@@ -239,7 +254,8 @@ void TaskCreatorService::implts_applyDoc
//-----------------------------------------------
css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
const css::awt::Rectangle& aPosSize ,
@@ -442,7 +286,7 @@ diff -rup framework-orig/source/services/taskcreatorsrv.cxx~ framework/source/se
{
// SAFE ->
ReadGuard aReadLock( m_aLock );
-@@ -274,6 +279,9 @@ css::uno::Reference< css::awt::XWindow >
+@@ -274,6 +290,9 @@ css::uno::Reference< css::awt::XWindow >
css::awt::WindowAttribute::SIZEABLE |
css::awt::WindowAttribute::CLOSEABLE |
css::awt::VclWindowPeerAttribute::CLIPCHILDREN ;
@@ -453,8 +297,8 @@ diff -rup framework-orig/source/services/taskcreatorsrv.cxx~ framework/source/se
else
{
diff -rup toolkit-orig/source/awt/vclxtoolkit.cxx toolkit/source/awt/vclxtoolkit.cxx
---- toolkit-orig/source/awt/vclxtoolkit.cxx 2010-07-22 11:59:39.000000000 +0200
-+++ toolkit/source/awt/vclxtoolkit.cxx 2010-08-09 16:02:22.000000000 +0200
+--- toolkit-orig/source/awt/vclxtoolkit.cxx 2010-08-09 17:37:07.000000000 +0200
++++ toolkit/source/awt/vclxtoolkit.cxx 2010-08-09 17:37:17.000000000 +0200
@@ -241,18 +241,15 @@ TOOLKIT_DLLPUBLIC WinBits ImplGetWinBits
}
commit ca9fa62f1941b260b9d6cd4d0b5238d9cd5da95c
Author: Radek Doulik <rodo at novell.com>
Date: Mon Aug 9 16:09:31 2010 +0200
update netbook small screen code to decorate help window n#621116
* patches/dev300/apply:
* patches/dev300/netbook-window-decoration-update.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index d320ffb..7d27b85 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3650,3 +3650,6 @@ oox-import-fix-ole2-shapes.diff, n#593611, rodo
upgrade-zlib-to-1.2.3.diff, fridrich
svx-fix-layout-build.diff, rodo
sfx2-style-edit-greyentry.diff, i#85003, simonaw
+
+[ Netbook ]
+netbook-window-decoration-update.diff, n#621116, rodo
diff --git a/patches/dev300/netbook-window-decoration-update.diff b/patches/dev300/netbook-window-decoration-update.diff
new file mode 100644
index 0000000..23db6fb
--- /dev/null
+++ b/patches/dev300/netbook-window-decoration-update.diff
@@ -0,0 +1,484 @@
+diff -rup vcl-orig/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx
+--- vcl-orig/inc/vcl/salframe.hxx 2010-07-22 12:30:37.000000000 +0200
++++ vcl/inc/vcl/salframe.hxx 2010-07-22 13:01:27.000000000 +0200
+@@ -294,7 +294,7 @@ public:
+ long CallCallback( USHORT nEvent, const void* pEvent ) const
+ { return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; }
+
+- virtual BOOL GetSmallScreenMode() { return FALSE; }
++ virtual BOOL IsInSmallScreenMode() { return FALSE; }
+ };
+
+
+diff -rup vcl-orig/inc/vcl/salsys.hxx vcl/inc/vcl/salsys.hxx
+--- vcl-orig/inc/vcl/salsys.hxx 2010-07-22 12:30:37.000000000 +0200
++++ vcl/inc/vcl/salsys.hxx 2010-07-22 12:47:49.000000000 +0200
+@@ -66,6 +66,13 @@ public:
+
+ // get info about the display
+
++ /* Queries whether we are in small screen mode, used on netbooks and
++ * other small screen devices
++
++ @returns whether we are in small screen mode
++ */
++ virtual bool IsInSmallScreenMode() { return false; }
++
+ /* Gets the number of active screens attached to the display
+
+ @returns the number of active screens
+diff -rup vcl-orig/inc/vcl/svapp.hxx vcl/inc/vcl/svapp.hxx
+--- vcl-orig/inc/vcl/svapp.hxx 2010-07-22 12:30:37.000000000 +0200
++++ vcl/inc/vcl/svapp.hxx 2010-07-22 12:47:59.000000000 +0200
+@@ -369,6 +369,7 @@ public:
+ static void SetDisplayName( const UniString& rDisplayName );
+ static UniString GetDisplayName();
+
++ static bool IsInSmallScreenMode();
+ static unsigned int GetScreenCount();
+ // IsMultiDisplay returns:
+ // true: different screens are separate and windows cannot be moved
+diff -rup vcl-orig/source/app/svapp.cxx vcl/source/app/svapp.cxx
+--- vcl-orig/source/app/svapp.cxx 2010-07-22 12:30:37.000000000 +0200
++++ vcl/source/app/svapp.cxx 2010-07-22 12:48:23.000000000 +0200
+@@ -1363,6 +1363,12 @@ UniString Application::GetDisplayName()
+
+ // -----------------------------------------------------------------------
+
++bool Application::IsInSmallScreenMode()
++{
++ SalSystem* pSys = ImplGetSalSystem();
++ return pSys ? pSys->IsInSmallScreenMode() : false;
++}
++
+ unsigned int Application::GetScreenCount()
+ {
+ SalSystem* pSys = ImplGetSalSystem();
+diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
+--- vcl-orig/unx/gtk/window/gtkframe.cxx 2010-07-22 16:36:28.000000000 +0200
++++ vcl/unx/gtk/window/gtkframe.cxx 2010-08-06 15:05:57.000000000 +0200
+@@ -807,17 +807,11 @@ void GtkSalFrame::Init( SalFrame* pParen
+ ( ! (nStyle & SAL_FRAME_STYLE_FLOAT) ||
+ (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE) ) );
+
+-
+ if( bDecoHandling )
+ {
+ bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
+- GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
+-
+- //if( Application::IsInSmallScreenMode() && bNoDecor ) {
+- nStyle |= SAL_FRAME_STYLE_SIZEABLE;
+- m_nStyle |= SAL_FRAME_STYLE_SIZEABLE;
+- //}
+
++ GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
+ if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
+ eType = GDK_WINDOW_TYPE_HINT_DIALOG;
+ if( (nStyle & SAL_FRAME_STYLE_INTRO) )
+@@ -848,8 +842,6 @@ void GtkSalFrame::Init( SalFrame* pParen
+ gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
+ }
+ OSL_TRACE("eWinType: %d eType: %d style: %d", eWinType, eType, nStyle);
+- if( GetSmallScreenMode() && 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 )
+@@ -1004,6 +996,14 @@ void GtkSalFrame::SetExtendedFrameStyle(
+ X11SalData::getFrameResName( m_nExtStyle ),
+ X11SalData::getFrameClassName() );
+ }
++ OSL_TRACE("vcl set extended style");
++ if ( ( m_nExtStyle & WB_EXT_DOCUMENT ) && Application::IsInSmallScreenMode() ) {
++ m_nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ;
++ nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE;
++ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
++ gtk_window_maximize( GTK_WINDOW(m_pWindow) );
++ OSL_TRACE("vcl set extended style: maximized");
++ }
+ }
+
+
+@@ -1630,10 +1630,6 @@ void GtkSalFrame::SetWindowState( const
+ SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
+ SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
+
+- OSL_TRACE("style: %d", m_nStyle);
+- if( GetSmallScreenMode() && !(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) &&
+@@ -1681,10 +1677,13 @@ void GtkSalFrame::SetWindowState( const
+ }
+ if( pState->mnMask & SAL_FRAMESTATE_MASK_STATE && ! isChild() )
+ {
+- if( pState->mnState & SAL_FRAMESTATE_MAXIMIZED )
++ OSL_TRACE("unmaximize?");
++ if( ( pState->mnState & SAL_FRAMESTATE_MAXIMIZED ) || ( ( m_nExtStyle & WB_EXT_DOCUMENT ) && Application::IsInSmallScreenMode() ) )
+ gtk_window_maximize( GTK_WINDOW(m_pWindow) );
+- else
++ else {
+ gtk_window_unmaximize( GTK_WINDOW(m_pWindow) );
++ OSL_TRACE("unmaximize");
++ }
+ /* #i42379# there is no rollup state in GDK; and rolled up windows are
+ * (probably depending on the WM) reported as iconified. If we iconify a
+ * window here that was e.g. a dialog, then it will be unmapped but still
+@@ -1700,7 +1699,6 @@ void GtkSalFrame::SetWindowState( const
+ gtk_window_deiconify( GTK_WINDOW(m_pWindow) );
+ }
+ }
+-}
+
+ BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
+ {
+@@ -3784,9 +3782,9 @@ gboolean GtkSalFrame::IMHandler::signalI
+ return FALSE;
+ }
+
+-BOOL GtkSalFrame::GetSmallScreenMode()
++BOOL GtkSalFrame::IsInSmallScreenMode()
+ {
+- return getDisplay()->getWMAdaptor()->getSmallScreen();
++ return getDisplay()->getWMAdaptor()->isInSmallScreenMode();
+ }
+
+ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
+diff -rup vcl-orig/unx/gtk/window/gtkframe.cxx~ vcl/unx/gtk/window/gtkframe.cxx~
+--- vcl-orig/unx/gtk/window/gtkframe.cxx~ 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/gtk/window/gtkframe.cxx~ 2010-08-05 13:44:54.000000000 +0200
+@@ -810,6 +810,13 @@ void GtkSalFrame::Init( SalFrame* pParen
+ if( bDecoHandling )
+ {
+ bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
++
++ if ( bNoDecor && Application::IsInSmallScreenMode() ) {
++ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
++ m_nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ;
++ nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE;
++ }
++
+ GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
+ if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
+ eType = GDK_WINDOW_TYPE_HINT_DIALOG;
+@@ -841,8 +848,6 @@ void GtkSalFrame::Init( SalFrame* pParen
+ gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
+ }
+ OSL_TRACE("eWinType: %d eType: %d style: %d", eWinType, eType, nStyle);
+- if( GetSmallScreenMode() && 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 )
+@@ -1623,10 +1628,6 @@ void GtkSalFrame::SetWindowState( const
+ SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
+ SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
+
+- OSL_TRACE("style: %d", m_nStyle);
+- if( GetSmallScreenMode() && !(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) &&
+@@ -1674,10 +1675,13 @@ void GtkSalFrame::SetWindowState( const
+ }
+ if( pState->mnMask & SAL_FRAMESTATE_MASK_STATE && ! isChild() )
+ {
++ OSL_TRACE("unmaximize?");
+ if( pState->mnState & SAL_FRAMESTATE_MAXIMIZED )
+ gtk_window_maximize( GTK_WINDOW(m_pWindow) );
+- else
++ else {
+ gtk_window_unmaximize( GTK_WINDOW(m_pWindow) );
++ OSL_TRACE("unmaximize");
++ }
+ /* #i42379# there is no rollup state in GDK; and rolled up windows are
+ * (probably depending on the WM) reported as iconified. If we iconify a
+ * window here that was e.g. a dialog, then it will be unmapped but still
+@@ -1693,7 +1697,6 @@ void GtkSalFrame::SetWindowState( const
+ gtk_window_deiconify( GTK_WINDOW(m_pWindow) );
+ }
+ }
+-}
+
+ BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
+ {
+@@ -3777,9 +3780,9 @@ gboolean GtkSalFrame::IMHandler::signalI
+ return FALSE;
+ }
+
+-BOOL GtkSalFrame::GetSmallScreenMode()
++BOOL GtkSalFrame::IsInSmallScreenMode()
+ {
+- return getDisplay()->getWMAdaptor()->getSmallScreen();
++ return getDisplay()->getWMAdaptor()->isInSmallScreenMode();
+ }
+
+ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
+diff -rup vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkframe.hxx
+--- vcl-orig/unx/inc/plugins/gtk/gtkframe.hxx 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 2010-07-22 13:03:17.000000000 +0200
+@@ -394,7 +394,7 @@ public:
+
+ static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
+
+- virtual BOOL GetSmallScreenMode();
++ virtual BOOL IsInSmallScreenMode();
+ };
+
+
+diff -rup vcl-orig/unx/inc/salsys.h vcl/unx/inc/salsys.h
+--- vcl-orig/unx/inc/salsys.h 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/inc/salsys.h 2010-07-22 12:51:27.000000000 +0200
+@@ -48,6 +48,7 @@ public:
+ virtual ~X11SalSystem();
+
+ // overload pure virtual methods
++ virtual bool IsInSmallScreenMode();
+ virtual unsigned int GetDisplayScreenCount();
+ virtual bool IsMultiDisplay();
+ virtual unsigned int GetDefaultDisplayNumber();
+diff -rup vcl-orig/unx/inc/wmadaptor.hxx vcl/unx/inc/wmadaptor.hxx
+--- vcl-orig/unx/inc/wmadaptor.hxx 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/inc/wmadaptor.hxx 2010-07-22 12:59:45.000000000 +0200
+@@ -347,7 +347,7 @@ public:
+ */
+ void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const;
+
+- bool getSmallScreen() const { return m_bSmallScreen; }
++ bool isInSmallScreenMode() const { return m_bSmallScreen; }
+ };
+
+ } // namespace
+diff -rup vcl-orig/unx/source/app/salsys.cxx vcl/unx/source/app/salsys.cxx
+--- vcl-orig/unx/source/app/salsys.cxx 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/source/app/salsys.cxx 2010-07-22 12:59:41.000000000 +0200
+@@ -38,6 +38,7 @@
+ #include <salinst.h>
+ #include <saldisp.hxx>
+ #include <salsys.h>
++#include <wmadaptor.hxx>
+
+ #include <rtl/ustrbuf.hxx>
+ #include <osl/thread.h>
+@@ -54,6 +55,11 @@ X11SalSystem::~X11SalSystem()
+ {
+ }
+
++bool X11SalSystem::IsInSmallScreenMode()
++{
++ return GetX11SalData()->GetDisplay()->getWMAdaptor()->isInSmallScreenMode();
++}
++
+ // for the moment only handle xinerama case
+ unsigned int X11SalSystem::GetDisplayScreenCount()
+ {
+diff -rup vcl-orig/unx/source/app/wmadaptor.cxx vcl/unx/source/app/wmadaptor.cxx
+--- vcl-orig/unx/source/app/wmadaptor.cxx 2010-07-22 12:30:35.000000000 +0200
++++ vcl/unx/source/app/wmadaptor.cxx 2010-07-22 14:37:41.000000000 +0200
+@@ -234,7 +234,7 @@ WMAdaptor* WMAdaptor::createWMAdaptor( S
+
+ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
+ m_pSalDisplay( pDisplay ),
+- m_bSmallScreen( false ),
++ m_bSmallScreen( false ),
+ m_bTransientBehaviour( true ),
+ m_bEnableAlwaysOnTopWorks( false ),
+ m_bLegacyPartialFullscreen( false ),
+diff -rup framework-orig/inc/services/taskcreatorsrv.hxx framework/inc/services/taskcreatorsrv.hxx
+--- framework-orig/inc/services/taskcreatorsrv.hxx 2010-07-22 11:44:36.000000000 +0200
++++ framework/inc/services/taskcreatorsrv.hxx 2010-07-22 11:54:34.000000000 +0200
+@@ -146,7 +146,8 @@ class TaskCreatorService : public css::
+
+ css::uno::Reference< css::awt::XWindow > implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
+ const css::awt::Rectangle& aPosSize ,
+- sal_Bool bTopWindow );
++ sal_Bool bTopWindow ,
++ sal_Bool bDocumentWindow );
+
+ void implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const;
+
+diff -rup framework-orig/source/services/taskcreatorsrv.cxx framework/source/services/taskcreatorsrv.cxx
+--- framework-orig/source/services/taskcreatorsrv.cxx 2010-08-06 12:42:09.000000000 +0200
++++ framework/source/services/taskcreatorsrv.cxx 2010-08-05 13:43:39.000000000 +0200
+@@ -46,6 +46,7 @@
+ #include <com/sun/star/frame/XModel.hpp>
+ #include <com/sun/star/frame/XDesktop.hpp>
+ #include <com/sun/star/awt/XTopWindow.hpp>
++#include <com/sun/star/awt/XTopWindow2.hpp>
+ #include <com/sun/star/awt/WindowDescriptor.hpp>
+ #include <com/sun/star/awt/WindowAttribute.hpp>
+ #include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
+@@ -139,6 +140,7 @@ css::uno::Reference< css::uno::XInterfac
+ static css::awt::Rectangle DEFAULTVAL_POSSIZE = css::awt::Rectangle(0, 0, 0, 0); // only possize=[0,0,0,0] triggers default handling of vcl !
+ static sal_Bool DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE = sal_False;
+ static sal_Bool DEFAULTVAL_ENABLE_TITLEBARUPDATE = sal_True;
++ sal_Bool bDocumentWindow = sal_False;
+
+ ::comphelper::SequenceAsHashMap lArgs(lArguments);
+
+@@ -151,6 +153,9 @@ css::uno::Reference< css::uno::XInterfac
+ sal_Bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE );
+ sal_Bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_ENABLE_TITLEBARUPDATE , DEFAULTVAL_ENABLE_TITLEBARUPDATE );
+
++ if (sFrameName.compareToAscii( "_blank") == 0)
++ bDocumentWindow = sal_True;
++
+ /* SAFE { */
+ ReadGuard aReadLock( m_aLock );
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+@@ -173,7 +178,7 @@ css::uno::Reference< css::uno::XInterfac
+ if ( ! xParentWindow.is())
+ bCreateTopWindow = sal_True;
+
+- xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow);
++ xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow, bDocumentWindow);
+ }
+
+ //------------------->
+@@ -190,8 +195,9 @@ css::uno::Reference< css::uno::XInterfac
+ ( xDesktop.is() )
+ )
+ );
+- if (bTopLevelDocumentWindow)
++ if (bTopLevelDocumentWindow) {
+ implts_applyDocStyleToWindow(xContainerWindow);
++ }
+ //------------------->
+
+ // create the new frame
+@@ -221,20 +227,26 @@ css::uno::Reference< css::uno::XInterfac
+ if (bVisible)
+ xContainerWindow->setVisible(bVisible);
+
++ if ( bTopLevelDocumentWindow && Application::IsInSmallScreenMode() ) {
++ css::uno::Reference< css::awt::XTopWindow2 > xTopWindow2( xContainerWindow, css::uno::UNO_QUERY );
++
++ if ( xTopWindow2.is() ) {
++ OSL_TRACE("maximize document window");
++ xTopWindow2->setIsMaximized( sal_True );
++ }
++ }
++
+ return css::uno::Reference< css::uno::XInterface >(xFrame, css::uno::UNO_QUERY_THROW);
+ }
+
+ //-----------------------------------------------
+ void TaskCreatorService::implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const
+ {
+- OSL_TRACE("set extended style to vcl");
+ // SYNCHRONIZED ->
+ ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ Window* pVCLWindow = VCLUnoHelper::GetWindow(xWindow);
+- if (pVCLWindow) {
++ if (pVCLWindow)
+ pVCLWindow->SetExtendedStyle(WB_EXT_DOCUMENT);
+- OSL_TRACE("(done) set extended style to vcl");
+- }
+ aSolarGuard.clear();
+ // <- SYNCHRONIZED
+ }
+@@ -242,7 +254,8 @@ void TaskCreatorService::implts_applyDoc
+ //-----------------------------------------------
+ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
+ const css::awt::Rectangle& aPosSize ,
+- sal_Bool bTopWindow )
++ sal_Bool bTopWindow,
++ sal_Bool bDocumentWindow )
+ {
+ // SAFE ->
+ ReadGuard aReadLock( m_aLock );
+@@ -277,6 +290,9 @@ css::uno::Reference< css::awt::XWindow >
+ css::awt::WindowAttribute::SIZEABLE |
+ css::awt::WindowAttribute::CLOSEABLE |
+ css::awt::VclWindowPeerAttribute::CLIPCHILDREN ;
++ OSL_TRACE("style, ssm: %d doc: %d", Application::IsInSmallScreenMode(), bDocumentWindow);
++ if (bDocumentWindow && Application::IsInSmallScreenMode() )
++ aDescriptor.WindowAttributes |= css::awt::WindowAttribute::NODECORATION;
+ }
+ else
+ {
+diff -rup framework-orig/source/services/taskcreatorsrv.cxx~ framework/source/services/taskcreatorsrv.cxx~
+--- framework-orig/source/services/taskcreatorsrv.cxx~ 2010-07-22 11:44:31.000000000 +0200
++++ framework/source/services/taskcreatorsrv.cxx~ 2010-07-22 14:41:24.000000000 +0200
+@@ -139,6 +139,7 @@ css::uno::Reference< css::uno::XInterfac
+ static css::awt::Rectangle DEFAULTVAL_POSSIZE = css::awt::Rectangle(0, 0, 0, 0); // only possize=[0,0,0,0] triggers default handling of vcl !
+ static sal_Bool DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE = sal_False;
+ static sal_Bool DEFAULTVAL_ENABLE_TITLEBARUPDATE = sal_True;
++ sal_Bool bDocumentWindow = sal_False;
+
+ ::comphelper::SequenceAsHashMap lArgs(lArguments);
+
+@@ -151,6 +152,9 @@ css::uno::Reference< css::uno::XInterfac
+ sal_Bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE );
+ sal_Bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(TaskCreatorService::ARGUMENT_ENABLE_TITLEBARUPDATE , DEFAULTVAL_ENABLE_TITLEBARUPDATE );
+
++ if (sFrameName.compareToAscii( "_blank") == 0)
++ bDocumentWindow = sal_True;
++
+ /* SAFE { */
+ ReadGuard aReadLock( m_aLock );
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+@@ -173,7 +177,7 @@ css::uno::Reference< css::uno::XInterfac
+ if ( ! xParentWindow.is())
+ bCreateTopWindow = sal_True;
+
+- xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow);
++ xContainerWindow = implts_createContainerWindow(xParentWindow, aPosSize, bCreateTopWindow, bDocumentWindow);
+ }
+
+ //------------------->
+@@ -239,7 +243,8 @@ void TaskCreatorService::implts_applyDoc
+ //-----------------------------------------------
+ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
+ const css::awt::Rectangle& aPosSize ,
+- sal_Bool bTopWindow )
++ sal_Bool bTopWindow,
++ sal_Bool bDocumentWindow )
+ {
+ // SAFE ->
+ ReadGuard aReadLock( m_aLock );
+@@ -274,6 +279,9 @@ css::uno::Reference< css::awt::XWindow >
+ css::awt::WindowAttribute::SIZEABLE |
+ css::awt::WindowAttribute::CLOSEABLE |
+ css::awt::VclWindowPeerAttribute::CLIPCHILDREN ;
++ OSL_TRACE("style, ssm: %d doc: %d", Application::IsInSmallScreenMode(), bDocumentWindow);
++ if (bDocumentWindow && Application::IsInSmallScreenMode() )
++ aDescriptor.WindowAttributes |= css::awt::WindowAttribute::NODECORATION;
+ }
+ else
+ {
+diff -rup toolkit-orig/source/awt/vclxtoolkit.cxx toolkit/source/awt/vclxtoolkit.cxx
+--- toolkit-orig/source/awt/vclxtoolkit.cxx 2010-07-22 11:59:39.000000000 +0200
++++ toolkit/source/awt/vclxtoolkit.cxx 2010-08-09 16:02:22.000000000 +0200
+@@ -241,18 +241,15 @@ TOOLKIT_DLLPUBLIC WinBits ImplGetWinBits
+ }
+
+
+- if ( bDecoratedWindow )
++ if( nComponentAttribs & ::com::sun::star::awt::WindowAttribute::NODECORATION )
+ {
+- if( nComponentAttribs & ::com::sun::star::awt::WindowAttribute::NODECORATION )
+- {
+- // No decoration removes several window attributes and must
+- // set WB_NOBORDER!
+- nWinBits &= ~WB_BORDER;
+- nWinBits &= ~WB_SIZEABLE;
+- nWinBits &= ~WB_MOVEABLE;
+- nWinBits &= ~WB_CLOSEABLE;
+- nWinBits |= WB_NOBORDER;
+- }
++ // No decoration removes several window attributes and must
++ // set WB_NOBORDER!
++ nWinBits &= ~WB_BORDER;
++ nWinBits &= ~WB_SIZEABLE;
++ nWinBits &= ~WB_MOVEABLE;
++ nWinBits &= ~WB_CLOSEABLE;
++ nWinBits |= WB_NOBORDER;
+ }
+
+ return nWinBits;
More information about the ooo-build-commit
mailing list