summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-12 16:33:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-12 16:40:15 +0000
commitb1beaf3f7a7d332890ea3877b657cd014562cf33 (patch)
tree5af17e62e6b4983660ad12bf5889ae8439cd2caa
parent7ac75351f16358fd0f9d83162eda25cca6de2622 (diff)
Resolves: rhbz#920697, #i110881#, rhbz#623191 presentation not fullscreen
Undecorated windows don't go full-screen correctly. Lets try and avoid using gtk_window_set_decorated and rely on gtk_window_set_role to get the WM to do the right thing. Change-Id: I0f9e9c26372ac50398fa69c404013e3035ed637b
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx32
1 files changed, 0 insertions, 32 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 07f6fb3f70e4..9433ae5dd6b3 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1091,7 +1091,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
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( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
@@ -1109,7 +1108,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), sal_False, true );
- bNoDecor = true;
}
else if( (nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
{
@@ -1124,8 +1122,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
}
#endif
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
- if( bNoDecor )
- gtk_window_set_decorated( GTK_WINDOW(m_pWindow), FALSE );
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
if( m_pParent && ! (m_pParent->m_nStyle & SAL_FRAME_STYLE_PLUG) )
gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
@@ -3331,40 +3327,12 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
return sal_False;
}
-extern "C" {
-gboolean implDelayedFullScreenHdl (void *pWindow)
-{
- SolarMutexGuard aGuard;
-
- /* #i110881# workaround a gtk issue (see
- https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
- gtk_window_fullscreen can fail due to a race condition,
- request an additional status change to fullscreen to be
- safe: if the window is now mapped ... and wasn't
- previously, ie. the race; we'll end up doing a nice
- gdk_wmspec_change_state here anyway.
- */
- if( pWindow )
- {
- gdk_window_fullscreen( GDK_WINDOW( pWindow ) );
- g_object_unref( pWindow );
- }
-
- return FALSE;
-}
-}
-
gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
GTK_YIELD_GRAB();
- if( pThis->m_bFullscreen )
- g_idle_add_full( G_PRIORITY_HIGH, implDelayedFullScreenHdl,
- g_object_ref( widget_get_window( pThis->m_pWindow ) ),
- NULL );
-
bool bSetFocus = pThis->m_bSetFocusOnMap;
pThis->m_bSetFocusOnMap = false;