diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-04-05 19:08:40 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-04-05 19:08:40 +1000 |
| commit | f27fbf31ddd074893a4a383f2698fb713d66a981 (patch) | |
| tree | 50f8b6278da5deeb636572280e0757446595b230 /gtk | |
| parent | b8caeebffe178f292d636e3075de6c4a24c7a56a (diff) | |
| download | scintilla-mirror-f27fbf31ddd074893a4a383f2698fb713d66a981.tar.gz | |
Backport: Backed out changeset: 7402342dc7a3 Caching client rectangle on EditView.
This change was not compatible with Cocoa as it uses document-based coordinates
rather than view-based.
Backport of changeset 6673:a22abea8d41e.
Diffstat (limited to 'gtk')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 2363aa080..a8b34e01b 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1681,7 +1681,7 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { Point pt; pt.x = int(event->x); pt.y = int(event->y); - PRectangle rcClient = view.ViewRectangle(); + PRectangle rcClient = GetClientRectangle(); //Platform::DebugPrintf("Press %0d,%0d in %0d,%0d %0d,%0d\n", // pt.x, pt.y, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); if ((pt.x > rcClient.right) || (pt.y > rcClient.bottom)) { @@ -2501,7 +2501,7 @@ gboolean ScintillaGTK::DrawTextThis(cairo_t *cr) { paintState = painting; repaintFullWindow = false; - rcPaint = view.ViewRectangle(); + rcPaint = GetClientRectangle(); PLATFORM_ASSERT(rgnUpdate == NULL); rgnUpdate = cairo_copy_clip_rectangle_list(cr); @@ -2518,7 +2518,7 @@ gboolean ScintillaGTK::DrawTextThis(cairo_t *cr) { rcPaint.top = y1; rcPaint.right = x2; rcPaint.bottom = y2; - PRectangle rcClient = view.ViewRectangle(); + PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); std::unique_ptr<Surface> surfaceWindow(Surface::Allocate(SC_TECHNOLOGY_DEFAULT)); surfaceWindow->Init(cr, PWidget(wText)); @@ -2553,7 +2553,7 @@ gboolean ScintillaGTK::DrawThis(cairo_t *cr) { // if both scrollbars are visible, paint the little square on the bottom right corner if (verticalScrollBarVisible && horizontalScrollBarVisible && !Wrapping()) { GtkStyleContext *styleContext = gtk_widget_get_style_context(PWidget(wMain)); - PRectangle rc = view.ViewRectangle(); + PRectangle rc = GetClientRectangle(); gtk_style_context_save(styleContext); gtk_style_context_add_class(styleContext, GTK_STYLE_CLASS_SCROLLBARS_JUNCTION); @@ -2605,7 +2605,7 @@ gboolean ScintillaGTK::ExposeTextThis(GtkWidget * /*widget*/, GdkEventExpose *os PLATFORM_ASSERT(rgnUpdate == NULL); rgnUpdate = gdk_region_copy(ose->region); - PRectangle rcClient = view.ViewRectangle(); + PRectangle rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); std::unique_ptr<Surface> surfaceWindow(Surface::Allocate(SC_TECHNOLOGY_DEFAULT)); cairo_t *cr = gdk_cairo_create(PWindow(wText)); |
