After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 79248 - No notification when window is maximized
No notification when window is maximized
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.0.x
Other Solaris
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 66754
 
 
Reported: 2002-04-19 16:35 UTC by padraig.obriain
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkwindow.c patch (327 bytes, patch)
2002-04-28 23:48 UTC, Matthias Clasen
none Details | Review
patch for handling it internally in gdk (2.61 KB, patch)
2002-05-02 19:07 UTC, Matthias Clasen
none Details | Review

Description padraig.obriain 2002-04-19 16:35:19 UTC
When using sawfish, no GDK_WINDOW_STATE event occurs when a window is
maximized
Comment 1 Havoc Pennington 2002-04-19 16:51:37 UTC
Get the "xprop" output on a maximized sawfish window and see if 
_NET_WM_WINDOW_STATE includes _NET_WM_WINDOW_STATE_MAXIMIZED
Comment 2 padraig.obriain 2002-04-22 06:59:59 UTC
When window is maximized xprop output has the line

_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT,
_NET_WM_STATE_MAXIMIZED_HORZ
Comment 3 Matthias Clasen 2002-04-28 23:47:30 UTC
The problem here is simply that GtkWindow doesn't select for 
PropertyNotify on its toplevels. Therefore its pure luck if gdk
catches any changes in _NET_WM_STATE. One-line fix attached.
Comment 4 Matthias Clasen 2002-04-28 23:48:31 UTC
Created attachment 8011 [details] [review]
gtkwindow.c patch
Comment 5 padraig.obriain 2002-04-29 10:44:51 UTC
This patch works for me. Can it be applied?
Comment 6 Owen Taylor 2002-04-29 15:56:55 UTC
Are there assumptions in GDK about being able to track
state changes? (That is, do we ever do things out of
PropertyNotify in gdk_event_translate() other than send
them on to GTK+?) If so, then we need to add the PropertyNotify
mask to all toplevel windows at the GDK level.

(And even if not, it strikes me as a little odd to have to
add the PROPERTY_CHANGE mask to get events apparently 
unrelated to GDK_PROPERTY_CHANGE events, so perhaps we
should add it at the GDK level anyways.)


Comment 7 Matthias Clasen 2002-04-30 06:56:58 UTC
I was wondering about that as well, but wanted to attach just a
minimal fix. If you 
decide to add PROPERTY_CHANGE_MASK in gdk,
does that mean that gdk uses them only 
internally, or will they
unconditionally be passed up to gtk ? 
Comment 8 Matthias Clasen 2002-05-02 11:46:38 UTC
Meanwhile, I learned that gdk already does filtering for expose
events 
(http://bugzilla.gnome.org/show_bug.cgi?id=54506), thus
we should probably 
do the same for property notify: always
select them for gdk's own purposes, but not 
propagate them to 
gtk unless they're requested by the event mask.
Comment 9 Owen Taylor 2002-05-02 14:14:07 UTC
Yeah, that's probably best; I think it's very dubious 
if a program breaks when it gets events it doesn't 
expect, but that doesn't mean that programs *don't*
break when they get events they don't expect.
Comment 10 Matthias Clasen 2002-05-02 19:06:37 UTC
Here is a patch to do so. I noticed that the symmetry between
gdk_window_get_events and gdk_window_set_events is broken. The
get method reports the StructureNotifyMask and PropertyChangeMask
which gdk adds for its own purposes, even though the events may
not be delivered (since the relevant flags in private->event_mask
are not set. It would probably be best to simple return 
private->event_mask in the getter. 
Comment 11 Matthias Clasen 2002-05-02 19:07:49 UTC
Created attachment 8127 [details] [review]
patch for handling it internally in gdk
Comment 12 Owen Taylor 2002-05-06 20:37:25 UTC
Looks fine to commit. (I was thinking that we should
only select for PropertyNotify on toplevel windows, but
I can't think of any particular reason that selecting
on child windows would hurt, and doing it for 
all windows makes gdk_window_reparent() simpler.)
Comment 13 Matthias Clasen 2002-05-06 22:11:08 UTC
Committed on both branches. I guess selecting for property notify on
child windows doesn't make a difference since you will hardly ever
see properties on non-toplevel windows.

How do you think about the get_events/set_events symmetry break ?
Comment 14 Owen Taylor 2002-05-15 15:44:06 UTC
the symmetry break doesn't bother me much. And I would
worry just a bit that if we made get_events() return GTK+'s
idea of the event mask that we might break some app that
was using XSelectInput() directly.

Maybe just best ignored?