This patch adds a capture phase to GTK+'s event propagation
model. Events are first propagated from the toplevel (or the
grab widget, if a grab is in place) down to the target widget
and then back up. The second phase is using the existing
::event signal, the new capture phase is using a private
API instead of a public signal for now.
This mechanism can be used in many places where we currently
have to prevent child widgets from getting events by putting
an input-only window over them. It will also be used to implement
kinetic scrolling in subsequent patches.
http://bugzilla.gnome.org/show_bug.cgi?id=641836
We automatically request more motion events in behalf of
the original widget if it listens to motion hints. So
the capturing widget doesn't need to handle such
implementation details.
We are not making event capture part of the public API for 3.4,
which is why there is no ::captured-event signal.
_gtk_widget_set_device_window() is suppose to make accounting of
the topmost widget under the device at each time, so avoid setting
it on virtual crossing events as the device is already in another
window.
Now that ATK no longer uses a key snooper but is invoked directly,
checking in advance for existing snoopers is wrong and stops ATK from
working.
Also: code reduction without performance loss == good thing.
https://bugzilla.gnome.org/show_bug.cgi?id=669176
Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
or must be included later due to redefinition of the compile-time
directories
and finish the port to using the new modifier abstraction API.
This commit has some evilness, it uses the default display for
the lack of a widget context, and the change to gtkstock.c
is very ugly, but I can't think of anything better given
GtkStockItem needs an accel mask instead of a proper accel
string.
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.
'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.
'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.
'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.
https://bugzilla.gnome.org/show_bug.cgi?id=649567
It is now no longer possible to disable it.
This doesn't matter though because GTK will not instantiate a11y
objects until you actually use it. So nothing changes in practice.
* gtk/gtkmain.c: (gtk_init): Mention that argc and argv can be 0,
using the new text from the g_applicatoin_run() documentation.
There was already introspection annotation about that.
(gtk_init_check, gtk_init_with_args): Use the same text here.
See bug #643649 comment 2.
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
macros for each included backend, include it in gdk.h and install
it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
In the process of removing all sealed members from headers.
At the same time, add a gtkwindowprivate.h header and move
all internal functions from gtkwindow.h there.
The gtkprivate.h header contains GtkWidget-specific private symbols that
are not useful except in a handful of cases. Basically everything
includes gtkprivate.h for the GTK_PARAM_* macros.
https://bugzilla.gnome.org/show_bug.cgi?id=632539
Rename the gtk_major_version() etc functions I introduced yesterday to
start with gtk_get. Avoids misleading results in client programs whose
developers that don't notice the change or the compiler warnings, and
when recompiling against gtk3 then use the function addresses as the
version numbers.
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
Having variables exported from a DLL is slightly painful and
potentially error-prone on Windows, so let's try get rid of them now
when we can. Starting with these.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=620440 (Reported by
Marek Kašík), where the print dialog modality would impair the pop-up
window from getting events. Device GTK+ grabs gain in specificness.
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GTK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GTK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
The translation_domain argument should be const gchar * to allow compilation
with -Wwrite-strings. It only passes the argument to
g_option_context_add_main_entries() which is already const gchar*.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=583305
Applications using non-double-buffered drawing using cairo (e.g. Abiword)
can draw directly to the window using cairo and thus manage to avoid
the automatic flushing of outstanding moves. This can cause redraw
inconsistencies like bug 593507.
We fix this by always flushing when exposing non-double-buffered widgets.
2009-01-13 Tor Lillqvist <tml@iki.fi>
Bug 164002 - query scripts don't work uninstalled on windows
* gtk/gtkmain.c (_gtk_get_libdir): If the gtk DLL is in a ".libs"
folder, assume we are running uninstalled, and use the
configure-time GTK_LIBDIR.
svn path=/trunk/; revision=22110
2008-09-22 Michael Natterer <mitch@imendio.com>
* gtk/gtksignal.[ch]
* gtk/gtkclist.c
* gtk/gtklist.c
* gtk/gtkmain.c
* gtk/gtktext.c
* gtk/gtktreeitem.c: use G_CALLBACK and GCallback instead of
GTK_SIGNAL_FUNC and GtkSignalFunc also in deprecated code.
svn path=/trunk/; revision=21488
2008-09-13 Tor Lillqvist <tml@novell.com>
* gdk-pixbuf/gdk-pixbuf-io.c
* gtk/gtkmain.c: Don't use the deprectated
g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory() functions. Use
g_win32_get_package_installation_directory_of_module()
instead. Also, don't use the deprecated silly
G_WIN32_DLLMAIN_FOR_DLL_NAME macro, but an explicit minimal
DllMain() that just saves the DLL handle.
svn path=/trunk/; revision=21381
2008-09-13 Cosimo Cecchi <cosimoc@gnome.org>
Bug 552153 – GtkModules loading with XSettings doesn't work if the
GTK_MODULES env var isn't set.
* gtk/gtkmain.c: (do_post_parse_initialization):
* gtk/gtkmodules.c: (_gtk_modules_init):
Call _gtk_modules_init () even if gtk_modules_string is NULL, so
that GtkModules specified with XSettings could be loaded.
svn path=/trunk/; revision=21380
2008-09-13 Tor Lillqvist <tml@novell.com>
* gdk-pixbuf/gdk-pixbuf-io.c
* gtk/gtkmain.c: Do as the docs for
g_win32_get_package_installation_directory() say and pass NULL as
the first parameter.
svn path=/trunk/; revision=21379
2008-07-31 Cody Russell <bratsche@gnome.org>
Bug 56070 – Can't click button after setting it sensitive.
* gtk/gtkwidget.[ch]
* gtk/gtkwindow.c
* gtk/gtkmain.c
* gtk/gtkbutton.c
* gtk/gtkprivate.h
* gdk/gdkevents.h: Synthesize crossing events events where necessary.
* gtk/tests/crossingevents.c: Add unit tests for crossing events.
Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
has worked on and helped out with this.
svn path=/trunk/; revision=20924