Kaydet (Commit) ef93683d authored tarafından Lucas Baudin's avatar Lucas Baudin Kaydeden (comit) Michael Meeks

Gtk3 fixes, I tweaked the damage function to debug the rendering (the damage are…

Gtk3 fixes, I tweaked the damage function to debug the rendering (the damage are is bigger to see a whole widget), if will need to be removed once we will fix that
üst 6da6ddcf
......@@ -181,9 +181,6 @@ class GtkSalFrame : public SalFrame, basebmp::BitmapDeviceDamageTracker
int m_nScreen;
GtkWidget* m_pWindow;
guint m_nIdleFullScreen;
#if GTK_CHECK_VERSION(3,0,0)
basebmp::BitmapDeviceSharedPtr m_aFrame;
#endif
int m_nDuringRender;
GdkWindow* m_pForeignParent;
GdkNativeWindow m_aForeignParentWindow;
......@@ -303,6 +300,9 @@ class GtkSalFrame : public SalFrame, basebmp::BitmapDeviceDamageTracker
DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
#if GTK_CHECK_VERSION(3,0,0)
basebmp::BitmapDeviceSharedPtr m_aFrame;
#endif
GtkSalFrame( SalFrame* pParent, sal_uLong nStyle );
GtkSalFrame( SystemParentData* pSysData );
......
......@@ -51,7 +51,6 @@ public:
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
sal_uInt16 /*nFlags*/ );
void updateSettings( AllSettings& rSettings );
virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
......@@ -64,9 +63,18 @@ public:
const rtl::OUString& rCaption,
Rectangle &rNativeBoundingRegion,
Rectangle &rNativeContentRegion );
void updateSettings( AllSettings& rSettings );
private:
GtkWidget *mpWindow;
GtkStyleContext *mpButtonStyle;
GtkStyleContext *mpEntryStyle;
GtkStyleContext *mpScrollbarStyle;
GtkStyleContext *mpToolbarStyle;
GtkStyleContext *mpToolButtonStyle;
void renderAreaToPix( cairo_t* cr, cairo_rectangle_t* rect );
void drawStyleContext( GtkStyleContext* style, GtkStateFlags flags,
const Rectangle& rControlRegion, bool render_background = true );
void getStyleContext( GtkStyleContext** style, GtkWidget* widget );
};
#else
......
......@@ -2997,11 +2997,15 @@ void GtkSalFrame::damaged (const basegfx::B2IRange& rDamageRect)
(int) rDamageRect.getHeight(),
area );
#endif
/* FIXME: this is a dirty hack, to render buttons correctly, we
* should of course remove the -100 and + 200, but the whole area
* won't be rendered then.
*/
gtk_widget_queue_draw_area( m_pWindow,
rDamageRect.getMinX(),
rDamageRect.getMinY(),
rDamageRect.getWidth(),
rDamageRect.getHeight() );
rDamageRect.getMinX() - 100,
rDamageRect.getMinY() - 100,
rDamageRect.getWidth() + 200,
rDamageRect.getHeight() + 200 );
#endif
}
......@@ -3132,7 +3136,6 @@ gboolean GtkSalFrame::signalDraw( GtkWidget*, cairo_t *cr, gpointer frame )
struct SalPaintEvent aEvent( rect.x, rect.y, rect.width, rect.height );
aEvent.mbImmediateUpdate = true;
pThis->CallCallback( SALEVENT_PAINT, &aEvent );
#if GTK_CHECK_VERSION(3,0,0)
pThis->renderArea( cr, &rect );
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment