RE: X crash when switching in full-screen mode



Hi Yoann,

A Gtk::DrawingArea is used to draw something; The realize signal is used to map into the Gtk::DrawingArea 
some signal/action/event/data and instantiates it....

In your source code, I never see the signal_realize. So you should write something like that :

Gtk::DrawingArea * DA; 
DA->signal_realize().connect(sigc::mem_fun(*this, &GlDrawingArea::on_realize))


To set a DrawingArea in fullscreen, you must disable the main window decorations (the main window contains 
the DrawingArea), then maximize the window and set it as fullscreen.

set_decorated(!get_decorated());
(get_decorated()) ? unmaximize() : maximize();
(get_decorated()) ? unfullscreen() : fullscreen();


Marco Dos Santos Oliveira
EBU/European Broadcasting Union
Technology and Innovation Department


-----Original Message-----
From: gtkmm-list [mailto:gtkmm-list-bounces gnome org] On Behalf Of Yoann LE BARS
Sent: dimanche 24 février 2013 04:49
To: gtkmm-list gnome org
Subject: Re: X crash when switching in full-screen mode


Hello everybody out there!

        Well, I have made some progress. Attached to this message, a tarball with some code which actually 
can start in full-screen mode. But I cannot be certain there is no major flaw.

        Here is what I did, and why. It will be nice if someone can confirm I am not mistaken.

        After investigating the web, it seems a widget has to go through the following steps during its life:

                - creation;

                - property setting (which is usually made into constructor);

                - realizing (assigning back-end resources, e.g. an X Window);

                - mapping (make widget appearing on screen);

                - show (actually does the previous two steps);

                - unmapping (removing widget from screen);

                - hide (simple version of unmap);

                - destroying.

        I have put "show();" before asking for full-screen mode, and then the code became been able to start 
into full-screen mode. I have tried with just "realize();", but it was not enough to avoid X crashing. So it 
seems to me Gtk+ cannot set a widget into full-screen mode before having mapped it.

        My question is: did someone know if I get it well, or did I still missed something?

        Regards.

                                                        Yoann
------------------------------------------------------------------------------

**************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the 
individual or entity to whom they are addressed.
If you have received this email in error, please notify the system manager. This footnote also confirms that 
this email message has been swept by the mailgateway
**************************************************



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