Bug 68152 - Redraw Surface
Summary: Redraw Surface
Status: RESOLVED INVALID
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.10.2
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 15:17 UTC by Chris Sparks
Modified: 2013-08-16 13:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Chris Sparks 2013-08-15 15:17:16 UTC
I have been coding up the examples for Cairo and have found that things draw ok for the most part.  When I cover my window with another window and then reexpose my cairo graphics window, the window doesn't redraw.  I get whatever the prior window contributed to the background.  I also notice in another application I am running that I get only the background fill (desktop image) on creation and nothing ever displays in the window.  I am using Gtk 3.4.1.
Comment 1 Uli Schlachter 2013-08-16 08:23:04 UTC
Cairo let's you draw to surface. That's it. It has nothing to do with automatic redraw when needed.

This is why normally Gtk uses double buffering. It let's you draw to an off-screen surface and then copies that to the screen whenever needed. You still have to implement the "draw" signal on your widgets to redraw when then needed (e.g. window was resized and thus your widget now has more/less space available).

So alltogether, your code has to handle redrawing, because only your code can do so. There is no bug here, neither in Gtk nor in Cairo.

(I don't know why the double buffering does not work in your case, but I guess you somehow disabled that. I have never really used Gtk and thus cannot say for sure and certainly not without looking at your code.)
Comment 2 Chris Sparks 2013-08-16 13:58:31 UTC
I am still having issues of drawing with my second application and I am diagnosing the software currently.  I see I get the configure event but nothing after that.

The canned example works right now and you are right I had to redraw it but I had to catch the WM_PAINT event (since I am using Windows) by using gdk_window_add_filter and then pushing an expose event to the event queue.  I don't use Gtk so I am guessing the makers decided to not send out the expose event which my application used back in the 2.x days.

I am coding in Ada so it may be a bit foreign to you to look at.

Chris.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.