CtrlCore: gtk3 warnings in GtkWnd removed

git-svn-id: svn://ultimatepp.org/upp/trunk@13892 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-15 18:44:23 +00:00
parent 93563a7394
commit 8bbf538b8f
3 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,7 @@
class ViewDraw : public SystemDraw {
#if GTK_CHECK_VERSION(3, 10, 0)
GdkDrawingContext *ctx;
#endif
public:
ViewDraw(Ctrl *ctrl);
~ViewDraw();

View file

@ -520,13 +520,29 @@ ViewDraw::ViewDraw(Ctrl *ctrl)
{
EnterGuiMutex();
Ctrl *top = ctrl->GetTopCtrl();
#if GTK_CHECK_VERSION(3, 22, 0)
cairo_rectangle_int_t r;
r.x = r.y = 0;
r.width = r.height = 100000;
cairo_region_t *rg = cairo_region_create_rectangle(&r);
ctx = gdk_window_begin_draw_frame(top->gdk(), rg);
cairo_region_destroy(rg);
cr = gdk_drawing_context_get_cairo_context(ctx);
#else
cr = gdk_cairo_create(top->gdk());
#endif
cairo_scale(cr, Ctrl::LSC(1), Ctrl::LSC(1));
Clipoff(ctrl->GetScreenView() - top->GetScreenRect().TopLeft());
}
ViewDraw::~ViewDraw()
{
FlushText();
#if GTK_CHECK_VERSION(3, 22, 0)
gdk_window_end_draw_frame(gdk_drawing_context_get_window(ctx), ctx);
#else
cairo_destroy(cr);
#endif
LeaveGuiMutex();
}

View file

@ -1,12 +1,12 @@
- Issue with editfield text clipping in the right
- Remove warnings
- DropChoice STDSIZE (.TopPosZ(10))
- LeftRoundness with DropChoice (DropChoiceRdO)
- DarkCold: problem slight problem with scrollbars
- Pushbutton push does not look nice
- Disabled empty combobox (FileSel::SelectDir) does not look nice
- ide menu in X11 ch
- OpenGL
- GtkDnD warnings
- TrayIconGtk warnings
NTH:
- spinbutton cosmetics
@ -67,3 +67,5 @@ DONE:
- disabled color in Breeze-Dark
- Problem with hot3 in scrollbar horizontal (check in SD)
- Problem with radio buttons in StdStyle - perhaps too big?
- OpenGL
- GtkWnd warnings