[Libreoffice-commits] core.git: 2 commits - vcl/headless vcl/unx
Caolán McNamara
caolanm at redhat.com
Mon Nov 30 07:30:32 PST 2015
vcl/headless/svpgdi.cxx | 8 ++++----
vcl/unx/gtk/gtksalframe.cxx | 19 ++++++++++---------
2 files changed, 14 insertions(+), 13 deletions(-)
New commits:
commit 2ca429e781cba94608e9838e2c1c50f1e8632b90
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 30 15:29:03 2015 +0000
gtk3: glitches because yours truly cannot tell x from y
Change-Id: I3b8620a4d8bffeb5e0558c35cb3a063238c12ba5
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index de916e7..f5f807e 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -82,13 +82,13 @@ namespace
double x1, y1, x2, y2;
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ extents.x = x1, extents.y = y1, extents.width = x2-x1, extents.height = y2-y1;
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
cairo_region_t *region = cairo_region_create_rectangle(&extents);
cairo_fill_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ extents.x = x1, extents.y = y1, extents.width = x2-x1, extents.height = y2-y1;
cairo_region_intersect_rectangle(region, &extents);
cairo_region_get_extents(region, &extents);
@@ -104,13 +104,13 @@ namespace
double x1, y1, x2, y2;
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ extents.x = x1, extents.y = y1, extents.width = x2-x1, extents.height = y2-y1;
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
cairo_region_t *region = cairo_region_create_rectangle(&extents);
cairo_stroke_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ extents.x = x1, extents.y = y1, extents.width = x2-x1, extents.height = y2-y1;
cairo_region_intersect_rectangle(region, &extents);
cairo_region_get_extents(region, &extents);
commit 0ae6d3da5f0016ac4924d3b9e668d0ae2a341e37
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 30 13:50:16 2015 +0000
Resolves: rhbz#1285380 get menus working under wayland
use GDK_WINDOW_TYPE_HINT_POPUP_MENU hint for menus
and set hints after widget is realized
and set gtk_window_set_transient_for menus too
then you get menus and tooltips apparently in the right place
Change-Id: I116d821d4eff480503348b8ff1fb8f4f247b4c1f
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index c5c01a4..62b0e06 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1392,6 +1392,15 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
if( m_pParent && m_pParent->m_pWindow && ! isChild() )
gtk_window_set_screen( GTK_WINDOW(m_pWindow), gtk_window_get_screen( GTK_WINDOW(m_pParent->m_pWindow) ) );
+ if (m_pParent)
+ {
+ if (!(m_pParent->m_nStyle & SalFrameStyleFlags::PLUG))
+ gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
+ m_pParent->m_aChildren.push_back( this );
+ }
+
+ InitCommon();
+
// set window type
bool bDecoHandling =
! isChild() &&
@@ -1432,17 +1441,9 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
#endif
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
- if( m_pParent && ! (m_pParent->m_nStyle & SalFrameStyleFlags::PLUG) )
- gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
}
else if( (nStyle & SalFrameStyleFlags::FLOAT) )
- {
- gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_UTILITY );
- }
- if( m_pParent )
- m_pParent->m_aChildren.push_back( this );
-
- InitCommon();
+ gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_POPUP_MENU );
if( eWinType == GTK_WINDOW_TOPLEVEL )
{
More information about the Libreoffice-commits
mailing list