Re: How to check if a window is maximized? (Gdk::Window_State_Maximized from a Gtk::Window)
- From: "Jonathon Jongsma" <jonathon quotidian org>
- To: Lukas Orlowski dlr de
- Cc: gtkmm-list gnome org
- Subject: Re: How to check if a window is maximized? (Gdk::Window_State_Maximized from a Gtk::Window)
- Date: Mon, 14 Apr 2008 07:13:31 -0500
I believe Gdk::Window::get_state() returns a bitfield enumeration. So
you don't want to compare it with ==, you want to do a bitwise &, as
in:
if ( Gdk::WINDOW_STATE_MAXIMIZED & pGDK->get_state() )
cout << "true" << endl;
Does that help?
On Mon, Apr 14, 2008 at 3:40 AM, <Lukas Orlowski dlr de> wrote:
> Good morning community
>
> I've been googling myself senseless while trying to find a solution for
> my problem.
>
> I want to check if a Gtk::Window is maximized using Gtkmm.
> The following does not work:
>
> Gtk::Window* wMainWindow;
> // snip...
> Glib::RefPtr<Gdk::Window> pGDK = wMainWindow->get_frame();
> if ( Gdk::WINDOW_STATE_MAXIMIZED == pGDK->get_state() )
> cout << "true" << endl;
>
> Neither does the following declaration:
>
> Gdk::WINDOW_STATE wstate;
>
>
> Any help is welcome.
>
> Best regards Luke
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]