Re: [gtk-list] Re: How to put a window on top ?



On Wed, 17 Nov 1999 11:03:44 +0100, Christian Orsatti wrote:
> Stefan Ondrejicka wrote:
>> On Wed, 17 Nov 1999, Christian Orsatti wrote:
>> > I have develop an interface with GTK. I have several popups that might
>> > be open at the same time. And I have not found the function to use to
>> > tell a popup to re-display itself on top.
>> > gtk_widget_show() won't do anything if the popup is already display.
>> > Thanks for your help
>>
>> if (GTK_WIDGET_REALIZED(popup))
>>         gdk_window_raise(popup->window);
> 
> Ok and thanks, it work fine. But I think it is not nice to use the structure
> of a popup (ie popup->window) to acces the window field. Until now, for all
> the code I write, I never look at what was inside a structure.
> So is there an over way to do that ?

It's just the way GTK works. Raising a window is done by the GDK layer, so
you have to give it a GDK window which is in the GTK structure. I agree
that from a object oriented view it is not nice to be bothered with the
implementation of an object, but sometimes you just have to leave that
idea.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]