Don't try to remember the current keyboard modifier and mouse button
states from the last event, because that isn't always right, and don't
set event.state = 0 for generated events. Instead, add private functions
to get the current states, and implement them with API that retrieves
these states independently from an event.
Move the remaining struct definition into gtkimcontextinfo.h and include
that header in gtk.h. gtkimmodule.h is now an empty header. We should
probably deprecate it somehow.
This is also necessary so headers used in gtk .c files don't include
gtk.h which in turn includes all the deprecated headers which we want to
avoid so we can include them with deprecation warnings turned off.
Make includes not rely on gtkimmodule.h including gtk.h. This will be
important once we remove gtkimmodule from the include files.
That way, we can achieve not pulling deprecated headers automatically.
_NET_WM_STATE_FOCUSED is a new _NET_WM_STATE hint which allows us to
implement a meaningful GDK_WINDOW_STATE_FOCUSED under X11. If the window
manager doesn't support this hint we keep GDK_WINDOW_STATE_FOCUSED set since
that is what gtk+ implicitly assumed historically.
https://bugzilla.gnome.org/show_bug.cgi?id=661428
This state means that the toplevel window is presented as focused to the user,
i.e with active decorations under an X11 window manager.
If the GDK backend doesn't implement this flag, it will just remain set after
mapping the window.
https://bugzilla.gnome.org/show_bug.cgi?id=661428
By default, a background image is stretched. Instead, it is worth to
have a tiled background.
This patch allows background surfaces to be repeated or not, and should
be compatible with future extensions and CSS.
https://bugzilla.gnome.org/show_bug.cgi?id=663522
If a zero-sized NSImage calls lockfocus it throws an exception. Make sure that the image isn't zero-sized before calling lockfocus, and log a warning and return NULL if it is zero-sized.
Have the quartz version of gtk_drag_begin_idle return FALSE if the returned image is NULL.
If _gtk_quartz_create_image_from_pixbuf is given a pixbuf with size 0, 0
or which produces an NSImage with size 0.0, 0.0, it throws an exception
which Gtk doesn't handle.
your changes. Lines starting
which effectively nails down the MOD1 == ALT assumption that is valid
in all other parts of GTK+. After the modifier abstraction fixes for
OSX, the virtual mapping is now (correctly) used in more places, and
caused problems with the common default PC keyboard layout on X11 that
colocates ALT and META on the same key.
Fixes e.g. crashs when dropping from finder.
Turn the "getting_events" boolean into a counter to handle poll_func()
being called recursively, and track the loop depth correctly by
changing its counter before bailing out in run_loop_observer_callback().
This way we reallocate our autorelease pool at the right time, and
don't kill memory that is still in use by outer run loops.
Also drain, not release the pool, just for some defensive forward
compatibility.
(cherry picked from commit ef9a92d225)
Since constructors like gtk_radio_button_new_from_widget take an
instance of their type as the first argument, the gi scanner interprets
them as methods.
https://bugzilla.gnome.org/show_bug.cgi?id=661858