Re: get_maximized

--- Emmanuele Bassi <ebassi gmail com> wrote:

On Wed, 2006-09-06 at 14:54 +0200, Ratcliffe, Jeffrey (Peters) wrote:
How do I check whether a window has been maximized or not?

Connect a callback to the 'window-state-event' event, and check the
passed Gtk2::Gdk::Event::WindowState when the event is fired; the
changed_mask member of the event should contain the 'maximized' flag.

  $window->signal_connect(window_state_event => sub {
      my ($w, $event) = @_;
      if ($event->changed_mask & [ 'maximized', ]) {
          print "The window has been maximized\n";


Emmanuele Bassi,  E: ebassi gmail com

gtk-perl-list mailing list
gtk-perl-list gnome org

Isn't "&" in

$event->changed_mask & [ 'maximized', ]

bitwise AND ?

And doesn't "[ 'maximized', ]" return array reference ?

If the answer to both questions is YES, how will it work ?


Applications From Scratch:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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