Re: [gtk-list] Trying to draw in a window
- From: Johan Hanson <j-hanson dsv su se>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Trying to draw in a window
- Date: Tue, 22 Jun 1999 22:21:47 +0200 (MET DST)
On 21 Jun 1999 hubert.fauque@wanadoo.fr wrote:
> I am trying to draw in a line in a window; I connect
> a function drawing the line to the expose event, and there
> is the following problem:
> if the window is (partly) behind another window and I click on it
> to bring it in the foreground, only the part of the line that
> was already in the uncovered part of the window appears;
> the other part is immediatly overwritten (by who?);
By the GtkWindow. Your signal handler is called before the GtkWindow
recieves the event, and the window widget will draw a rectangle over the
newly uncovered region.
You could get the event after the GtkWindow has responded to it by
connecting the signal with gtk_signal_connect_after().
That would still be ugly though. My advice is that you write a widget
that draws the line.
Even if would mean a lot of work learning how to write widgets, it would
be a rewarding exercise since it is then easier to write other widgets
when you have to in the future.
/ Johan
-- johan@tiq.com -- http://www.dsv.su.se/~j-hanson/ --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]