summaryrefslogtreecommitdiff
path: root/gtk/gtkimmulticontext.c
Commit message (Collapse)AuthorAgeFilesLines
* immulticontext: Unset client widget on delegate changeMatthias Clasen2021-04-021-0/+3
| | | | | | | | | | Forgetting to do so was causing the Wayland im context to leave behind a dead event controller. This was showing up as a crash when closing the inspector after changing the im-module property of a GtkText widget. The crash was delayed until closing the inspector because the inspector keeps a ref on the event controllers of the currently shown widget.
* immulticontext: Convert docsMatthias Clasen2021-03-111-9/+14
|
* immulticontext: Implement [gs]et_surrounding_with_selectionMatthias Clasen2021-03-041-20/+28
| | | | This is the recommended api, going forward.
* Replace "gchar" with "char"Benjamin Otte2020-07-251-10/+10
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-13/+13
|
* Rename delegate input method contextEmmanuele Bassi2020-06-181-92/+92
| | | | | | The GtkIMMultiContext uses a delegate pattern to proxy an existing input method context. Let's not use loaded terms like "slave" when we have perfectly fungible terms like "delegate".
* gtk: Stop using modifier intentsMatthias Clasen2020-04-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewing the existing settings, the only backend with some differences in the modifier intent settings is OS X, and we would rather have that implemented by interpreting the existing modifiers in the appropriate way. X11 Wayland Win32 OS X primary ctrl ctrl ctrl mod2 mnemonic alt alt alt alt context menu - - - ctrl extend sel shift shift shift shift modify sel ctrl ctrl ctrl mod2 no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl shift group varies - - alt GTK now uses the following modifiers: primary ctrl mnemonic alt extend sel shift modify sel ctrl no text alt|ctrl The context menu and shift group intents were not used in GTK at all. Update tests to no longer expect <Primary> to roundtrip through the accelerator parsing and formatting code.
* gtk: Stop using keymap apisMatthias Clasen2020-04-061-2/+2
| | | | | Stop using most keymap apis in GTK. Only a few calls related to virtual modifiers are left.
* gkimmulticontext: Fix crash due to leaked signal handlerAlexandr Miloslavskiy2020-03-201-0/+6
| | | | | | | | | | | | The problem is caused by gtk_im_multicontext_set_slave(), which forgets to disconnect these signal handlers: * gtk_im_multicontext_retrieve_surrounding_cb * gtk_im_multicontext_delete_surrounding_cb If slave GtkImContext emits signal after GtkIMMulticontext context is destroyed, this leads to reading freed memory, sometimes causing a crash. Fixes: #2365
* gtk: Stop using GdkEventKeyMatthias Clasen2020-02-211-6/+6
| | | | | We should just use GdkEvent, instead of taking a GdkEventKey, and then cast it everywhere.
* events: reorganize gettersMatthias Clasen2020-02-211-3/+4
| | | | | | | | | | Restructure the getters for event fields to be more targeted at particular event types. Update all callers, and replace all direct event struct access with getters. As a side-effect, this drops some unused getters.
* Remove unused includesMatthias Clasen2019-09-161-2/+0
| | | | | Don't include gtkmenu.h in places where it isn't used anymore.
* Fix a crashMatthias Clasen2019-04-121-0/+1
| | | | | | We had a signal handler with a wrong signature, causing a crash when looking at the GtkSettings properties in the inspector.
* immodule: Pass a GdkDisplay for default context IDBenjamin Otte2019-01-081-1/+7
| | | | | After all, the context depends on the display - we want to use the wayland context for Wayland, xim for X11 and so on.
* immulticontext: Don't have a global_context_idBenjamin Otte2019-01-081-29/+25
| | | | | | | | | | Context IDs are dependant on the display - both because displays can use different backends, but also because changing the GtkSetting is a per-display operation. So just remove the cache. If it turns out we need a per-display cache, we can add one to GtkSettings.
* GdkSurface: Rename lots of stuff from window->surfaceAlexander Larsson2018-03-201-1/+1
| | | | | Mostly these are internal things, but the major public change is that event.window is now event.surface.
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
* The big versioning cleanupMatthias Clasen2018-02-061-4/+0
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* Replace gdk_keymap_get_for_display by gdk_display_get_keymapMatthias Clasen2017-12-151-1/+1
| | | | | Replace all uses of the old function by the new one. No functional change.
* immulticontext: Remove unused variableBenjamin Otte2017-10-311-1/+0
|
* immulticontext: Avoid GdkScreen apiMatthias Clasen2017-10-301-2/+1
| | | | No need for it here either.
* imcontext: Update to using GdkEvent APICarlos Garnacho2017-09-191-5/+7
|
* imcontext: Remove API dependency on GdkWindowCarlos Garnacho2017-05-251-12/+12
| | | | | There is now a set_client_widget() to hint the IM about positioning and whatnot.
* Remove deprecated gtk_im_multicontext_append_menuitemsRico Tzschichholz2016-10-231-156/+0
|
* immodule: Remove unused parameterBenjamin Otte2015-08-201-2/+2
|
* Fix the previous commitMatthias Clasen2015-02-231-2/+2
| | | | | The C_() macro only takes string literals. Use g_dpgettext2() instead
* Make gtk-im-context-none workMatthias Clasen2015-02-231-27/+11
| | | | | | | | | This was added a few years ago, as a way to have _no_ im context at all. But it didn't actually work. Make it work, and streamline the handling of none by moving it all to gtkimmodule.c. As part of this, add context to the translated names of all im modules we ship.
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-4/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* im: Deprecate gtk_im_multicontext_append_menuitemsChristian Persch2013-06-091-0/+5
| | | | Bug #701840.
* gkimmulticontext: Remove left over debug printAdel Gadllah2012-08-261-2/+0
| | | | | | Remove the g_print debug statement from propagate_purpose. https://bugzilla.gnome.org/show_bug.cgi?id=682747
* GtkIMMultcontext: Propagate input purpose and hintsMatthias Clasen2012-08-251-3/+36
| | | | | The lack of this was pointed out by Carlos Garnacho in https://bugzilla.gnome.org/show_bug.cgi?id=651244
* immulticontext: Always check if the global context id changedRui Matos2012-05-081-12/+9
| | | | | | | | | | | This makes sure that if the gtk-im-module setting changes we update our internal state immediately on the next event whichever it is. In particular this fixes the case of the gtk-im-module setting changing while the user is typing and the slave context remaining the same, effectively ignoring the setting change. https://bugzilla.gnome.org/show_bug.cgi?id=675365
* types: Clean up gtkwidget.h includesBenjamin Otte2012-03-031-2/+3
| | | | | | | In particular gtksettings.h and gtkstylecontext.h needed to be included in lots of places now. Also, I order the includes alphabetically in a bunch of headers.
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* gtk: Empty gtkimmodule.hBenjamin Otte2011-11-081-1/+0
| | | | | | | | | | 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.
* immodule: Move private functions to a private headerBenjamin Otte2011-11-081-0/+1
|
* immodule: Fix includesBenjamin Otte2011-11-081-0/+2
| | | | | | | 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.
* gtk: clean up the private horrorMichael Natterer2011-10-221-2/+2
| | | | | | | | | | | - 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
* gtk: remove the private GTK_NO_TEXT_INPUT_MOD_MASKMichael Natterer2011-09-271-12/+26
| | | | and use the new public modifier abstraction API.
* gtk: fix entering of Option-foo symbols on the MacMichael Natterer2011-09-261-1/+1
| | | | | | define GTK_NO_TEXT_INPUT_MOD_MASK in gtkprivate.h and use it in the IM contexts, so Option-foo is no longer filtered away.
* Don't only use ch != 0 to check if a character is a control char.Jasper St. Pierre2011-03-161-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=644976
* gtk: Avoid GdkDrawable usage, including needless castsBenjamin Otte2010-12-021-1/+1
|
* gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visualBenjamin Otte2010-09-261-1/+1
|
* gtkimmulticontext: move documentation to inline commentsJavier Jardón2010-09-011-0/+8
|
* GtkIMMulticontext: move public members to private structureJavier Jardón2010-07-131-61/+87
|
* Use accessor functions to access GtkCheckMenuItemJavier Jardón2010-07-131-1/+1
|
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-5/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Allow running without any im contextMatthias Clasen2010-02-091-3/+37
| | | | | Setting GtkSettings::im-module to gtk-im-context-none will make GtkIMMultiContext just pass through.
* Don't forget to set the client window on the slaveMatthias Clasen2009-09-041-0/+3
|
* Rework the way IM contexts are setMatthias Clasen2009-09-041-39/+33
| | | | | | | Add a function to obtain the effective context id, and reset the slave only when the effective context id is different from the current context id, when setting a client window and on focus in. This might fix bug 593868 and bug 567124.