The clip rectangle is not necessarily the visible area. It's the exposed or damaged area. The scroll view works by copying the rendered contents a little higher up in the buffer, and then telling your drawing area to render the stuff that wasn't already on the window.
If window is resized or it loses focus, the size or style of the window changes, and everything is fully redrawn, so it can't copy any old contents of the drawing area, so it asks you to redraw the entire drawing area.On Sat, Mar 30, 2013 at 6:22 PM, pecisk@xxxxxxxxx <pecisk@xxxxxxxxx> wrote:
I tried to isolate code and tried not to draw anything on DrawingArea - it still returned smaller values.However, there's problem. When windows open first I get proper value of returned area from gdk_cairo_get_clip_rectangle. However when I do a scrolling, it starts to return ten times smaller width, t.i. at the size of scrolling step. And every time I scroll it keeps getting this ten times smaller width than initial value. What's more interesting, when windows lose focus or gets resized, it gets correct width.Hi everyone!I have simple scrollable window, which has DrawingArea within it. So before I draw anything, I take gdk_cairo_get_clip_rectangle, as I want to get width of actually visible area. Then I use it to do drawing to surface and then applying it to cairo context.
What did I miss, what's could be wrong in this case?Respectfully,
Peteris Krisjanis.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list
--
Jasper
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list