Figuring out the window state



Hello!

I'm trying to figure out the window state of my applications window
because keeping track of the state with variables is AFAIK not possible,
e.g. the WM may iconify a window on start up without raising the
appropriate signals. Asking the WM would be a solution to get the window
state.

I tried something like this:

Gdk::WindowState ws
    = this->get_screen()->get_active_window()->get_state();
std::cout << "WS: " << ws << std::endl;
if ((ws & Gdk::WINDOW_STATE_ICONIFIED) == Gdk::WINDOW_STATE_ICONIFIED)
  ...

But the window state is 0, i.e. ws == 0, which is wrong because the
window is iconified.

My question is now how to figure out the window state. I could not find
methods to do so.

Thanks,
Simon


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