Compare commits
338 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa384b3eb9 | |||
| 1e82c8e706 | |||
| 60533aadca | |||
| 1617e7ec2e | |||
| 7c2f813b8f | |||
| f62bf3aab7 | |||
| aeddd3e48b | |||
| 4a42503509 | |||
| 87eae26934 | |||
| 799d1f7adb | |||
| 9fde11c4c1 | |||
| 5c25c0ad9a | |||
| 40b3e69a09 | |||
| dcec13444f | |||
| 5ea59fb1dd | |||
| 26fa630c65 | |||
| 860d987001 | |||
| 27b5e17404 | |||
| e071a0c117 | |||
| f5fb6db1e3 | |||
| 09ed01e8a7 | |||
| 9feda1c92c | |||
| 0f02cd2bcb | |||
| a20e7634b6 | |||
| e8b69526c2 | |||
| c66f194d05 | |||
| c55784626a | |||
| 29d6eec09a | |||
| a2420a40da | |||
| 7e0434cfcd | |||
| d95b84c0ea | |||
| 81b7c4e40b | |||
| 198ad4df90 | |||
| cf962321e8 | |||
| 4b880d50f1 | |||
| 37675d8227 | |||
| d4c049059f | |||
| 2ca82e6ddf | |||
| 2898b2bbd8 | |||
| a411d6b199 | |||
| 4c691ac8f8 | |||
| 16be72eb13 | |||
| 4c796df901 | |||
| fc4263535b | |||
| 13a56fb3a2 | |||
| 5135522de6 | |||
| caadbdf630 | |||
| f6f23149a2 | |||
| 0bddd31389 | |||
| 4de2154368 | |||
| 84a651caf1 | |||
| 80aca3be77 | |||
| ce69a803a7 | |||
| 5e556d778a | |||
| 5b2e44fd44 | |||
| 124e43d078 | |||
| 2f66920b54 | |||
| 41ba15bbf2 | |||
| 1e80b89c9c | |||
| 28baa6de5a | |||
| a50151e0df | |||
| fe45e8c048 | |||
| bb1d313dfe | |||
| f68ad7b45a | |||
| d16b9f99eb | |||
| b4e4e211a6 | |||
| 0764f75dee | |||
| ad29977bf7 | |||
| 0f661e1458 | |||
| 9000fa1f81 | |||
| 2553ab21ee | |||
| ce9680fab3 | |||
| 86f17b3a17 | |||
| f09b01dd19 | |||
| a1b4c09901 | |||
| 1351ad0e62 | |||
| 125263713b | |||
| 03058dd76a | |||
| be41057a74 | |||
| 876d5f0748 | |||
| 6279b6125a | |||
| ad5889690a | |||
| 785cba1e7b | |||
| b355a88456 | |||
| 463d12cfcd | |||
| 727182f0f9 | |||
| 3d5e50daa2 | |||
| a27d2413aa | |||
| b613e3a1e0 | |||
| 641a0ad8a8 | |||
| 72b0bcbad5 | |||
| d7798950ed | |||
| 287464a64a | |||
| 1add0e3f2a | |||
| aaf32faedc | |||
| f2e7bce43a | |||
| e6dc6382c7 | |||
| 7e4ce73751 | |||
| 4ded4549f1 | |||
| daee40abef | |||
| db71def54a | |||
| 1e93ed9630 | |||
| 205c4288a4 | |||
| 3c58485a7f | |||
| 8a98feef19 | |||
| 4249d6e931 | |||
| e061305d61 | |||
| 81f06e1749 | |||
| c65c217741 | |||
| bd3f7f0619 | |||
| 22ca91ffae | |||
| 5aae1eadb7 | |||
| f04fe99deb | |||
| 7b08ca94cc | |||
| 4932d44b9e | |||
| b4244b734e | |||
| b489d20ac4 | |||
| 044e34b34f | |||
| 8dee19fca8 | |||
| 30782e26a9 | |||
| f9dd457b25 | |||
| 29f453b975 | |||
| 18190f6dba | |||
| eadbb077a5 | |||
| 074585b3e3 | |||
| a3864ac49f | |||
| e77f16e54c | |||
| 948767960f | |||
| 5753f69b68 | |||
| 5680244e8f | |||
| eb899ebbf8 | |||
| 2b91f5de30 | |||
| 828f9eb1e7 | |||
| 231d6c209f | |||
| 662e718631 | |||
| 0fee20071c | |||
| 2f1d718e13 | |||
| 650da1e6b0 | |||
| 8ae3bae9a9 | |||
| 8368b12b61 | |||
| fecd632e57 | |||
| 945e5bd859 | |||
| 16f3b2f5c8 | |||
| c3852404e6 | |||
| 6bf7af2a46 | |||
| 0c1fd574b0 | |||
| 6ff37b070b | |||
| 5f9c83da83 | |||
| 7e86d69854 | |||
| 52decc32fe | |||
| bb8254877b | |||
| 1a3ec8e98d | |||
| f35fb0c661 | |||
| 4380ce8495 | |||
| 5b74700608 | |||
| c00b2ead83 | |||
| ca01f7c042 | |||
| cc9928065b | |||
| f7ecc91327 | |||
| 0ce7854a3c | |||
| fc9c5228d3 | |||
| 87869d1442 | |||
| f833d84be1 | |||
| 0c9946631a | |||
| 8e56a80972 | |||
| c6a4065c5a | |||
| 03b60f94c0 | |||
| 9de7b8af49 | |||
| b81117479b | |||
| fff0358261 | |||
| e08c1f5849 | |||
| 7106f426bb | |||
| 86392ca3d6 | |||
| 0077c2ac5a | |||
| 6fad3b1b0d | |||
| d9a6214725 | |||
| b708fc4c14 | |||
| e64e81bcf4 | |||
| 38b62e4660 | |||
| d0699235bf | |||
| a7dae64d59 | |||
| 8c42e760bf | |||
| e3c46cd253 | |||
| bf28168d42 | |||
| 78f02cc5b6 | |||
| afadd23d0a | |||
| 51a0f35d83 | |||
| e9848b7db4 | |||
| ee4c1ded51 | |||
| 2e6697b588 | |||
| 49c9db74b4 | |||
| 0ba7d68d50 | |||
| 0104f5c1bd | |||
| db98346844 | |||
| 2c552820dc | |||
| 4d24c714c0 | |||
| ed548bac49 | |||
| 66b0b287f1 | |||
| 4a8203abff | |||
| 1b3f5d39a2 | |||
| a101e85931 | |||
| f08c27542b | |||
| cdc93acb25 | |||
| 255511a44b | |||
| d150a9f887 | |||
| c0e374dbbd | |||
| 6238ed3c97 | |||
| 7caa7aa6aa | |||
| 05137833af | |||
| 5240cc79db | |||
| e292243e9a | |||
| 72abb9ea1e | |||
| 9244c8e74a | |||
| f93f666446 | |||
| f7bbbd51bf | |||
| 03bb44ae2f | |||
| 468daefa21 | |||
| 4e997cda73 | |||
| 1045dca148 | |||
| f713111232 | |||
| f741a4b64f | |||
| 859d502095 | |||
| 4400c21523 | |||
| 83c9d0df8b | |||
| 365612cfda | |||
| ff4c3bc5a8 | |||
| 818c590671 | |||
| 450f9c6d1d | |||
| 5ddc5e6b62 | |||
| 12ffae5b1b | |||
| e495d318cb | |||
| b54f277a9b | |||
| 8c02e290c4 | |||
| 6ca15267c9 | |||
| 496e2a486e | |||
| 2636a091c8 | |||
| 3342732846 | |||
| 2335d11356 | |||
| 9c94e48420 | |||
| 95f3fcadb9 | |||
| 97c7586fdb | |||
| ec823e4c93 | |||
| c8bac063a2 | |||
| 0fac7578ce | |||
| 1da101c202 | |||
| 6d08a67297 | |||
| fff0ed307d | |||
| 73c6f82f5d | |||
| 2f555ca155 | |||
| 42650a2a3f | |||
| 5442023b80 | |||
| ac31a0c29d | |||
| 7353b052b0 | |||
| b7456e253d | |||
| a74fc2fdf1 | |||
| 94ffe17f74 | |||
| 6297fc28f3 | |||
| 8301f4258f | |||
| 58889736f6 | |||
| e3e8783c98 | |||
| dc6cb1d2f1 | |||
| 71250a7b74 | |||
| 4a57841c74 | |||
| e2648b8794 | |||
| d2a32d3309 | |||
| 13f29d1666 | |||
| 4ff5920876 | |||
| 7e006543ba | |||
| 4a9fae23b3 | |||
| 9a7affbd69 | |||
| a2179cd9af | |||
| bbd6669ce5 | |||
| 93d503d5d9 | |||
| 5ca69b319a | |||
| cfa20539f7 | |||
| 75c8fe77fe | |||
| 8bcd4c4ed5 | |||
| d3752c4c2f | |||
| 15fc151bd7 | |||
| 9fa2406687 | |||
| 2743e96721 | |||
| 4d95403144 | |||
| 97cd5809ef | |||
| cd1cab2a9f | |||
| 3aa42a83b1 | |||
| 5da225b425 | |||
| adf6875d54 | |||
| 2764eb8518 | |||
| 22b4ac28a1 | |||
| e7b83db34c | |||
| 3ca01303c0 | |||
| ff8005a73b | |||
| 824a7c35f1 | |||
| 248854d1ac | |||
| e314029326 | |||
| addb269740 | |||
| 814da3da2b | |||
| 2126796de1 | |||
| 980968c65a | |||
| c8b3d2318a | |||
| cf09b40961 | |||
| 2f84f2d0b3 | |||
| 646efb936e | |||
| 50082cd220 | |||
| 94500e03e2 | |||
| 547df506f2 | |||
| 79f527b223 | |||
| ac06a672b0 | |||
| f48255f484 | |||
| 628a794ade | |||
| 44f05f6546 | |||
| 2b9ee49e73 | |||
| 488da31fe2 | |||
| 74e8ed196b | |||
| 549893c7d1 | |||
| f15021b7d0 | |||
| 2dfeb3b7ac | |||
| f83b794ce8 | |||
| f545a2b2c6 | |||
| e0deb74845 | |||
| 2e9567afb7 | |||
| 53d5eef846 | |||
| e299469e18 | |||
| db496ca88d | |||
| 3e510cbd1b | |||
| fcc6f9adff | |||
| e565ef5055 | |||
| 5b5608c1e3 | |||
| d79db12faa | |||
| 67c08d7c1d | |||
| f7676ba9ed | |||
| ddd6471d14 | |||
| 857c01028a | |||
| 6b45f3e1c4 | |||
| 16c9f37b18 | |||
| be65eb8850 | |||
| 75a19fdf18 | |||
| 46e7d8530c |
@@ -1,3 +1,271 @@
|
||||
Overview of Changes in GTK+ 3.8.9
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
719762 translate_crossing_mode() assertion error sinc...
|
||||
win32: add more width to the slider to not cut...
|
||||
win32: add margin to scale trough
|
||||
win32: set color for scale marks
|
||||
win32: actually match the separator
|
||||
win32: scale slider with marks was off by 2 pixels
|
||||
win32: handle again gtk-font-name
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.8
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
705203 Natural scroll doesn't work immediately
|
||||
712799 Memory leak when listing Avahi printers
|
||||
715029 Ensure GdkScreen::monitors-changed gets emitted...
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.7
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
577642 Selected Printer Does Not Stick Between Sessions
|
||||
699574 gtk_selection_owner_set() breaks mouse wheel scrolling
|
||||
702663 GtkComboBox::appears-as-list does not respect scrolling
|
||||
703784 Epiphany crash during displaying printing dialog
|
||||
705176 Reordering columns in GtkTreeView freezes mutter
|
||||
710666 Frame clock related bug fixes
|
||||
710754 GtkModelMenu: don't leak submenus
|
||||
712213 Nautilus "connect to server" dialog has an incorrect "_"...
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.6
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
698730 tooltip: Fix possible wrong placement
|
||||
709697 Fix a warning in builg gtk+ with clang
|
||||
709967 Double free in gtkicontheme.c
|
||||
710073 Assertion failure because _gtk_icon_info_load...
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.5
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
339539 Ctrl-C, Ctrl-V changes tags
|
||||
341146 reorder lines in configure.in for a better display
|
||||
513812 Optimize gdk_cairo_set_source_pixbuf() alpha multipli...
|
||||
586107 gtkprintbackendpapi.c does not compile on Solaris 10
|
||||
696756 x11: gdk_device_get_source : assertion `GDK_IS_DEVICE...
|
||||
703062 GtkTreeViewColumn returns negative size request on em...
|
||||
706269 Clarify GtkBox, GtkHBox, and GtkVBox documentation
|
||||
706345 GtkExpander's click-and-drag behavior should match th...
|
||||
707872 GtkSwitch shouldn't have a default name
|
||||
707926 GtkSwitch shouldn't have a default accessible description
|
||||
708414 entrycompletion: set the GtkWindow as attached to the...
|
||||
709056 icontheme: use g_file_load_contents() for symbolic icons
|
||||
709264 Fix memory leaks in icons handling
|
||||
|
||||
* Translation updates:
|
||||
Scottish Gaelic
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.3
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
667759 gtkdnd-quartz.c is missing annotations for introspection
|
||||
672271 File chooser seems over-enthusiastic about using subdir...
|
||||
674108 Hard crash due to wrong NSAutoreleasePool stacking
|
||||
680953 set_item_width / text wrapping doesn't work in iconview...
|
||||
688738 GtkMenuButton problem with mnemonics / accelerators
|
||||
691921 GTK+ (quartz) built on Mac OS X 10.5 references [NSMenu...
|
||||
692548 Quartz: Cursor doesn't reset when the mouse leaves a to...
|
||||
694273 Patch to support NSTextInputClient in text widgets
|
||||
694755 When clicking Activities, sometimes gnome-shell crashes.
|
||||
696498 can't set download folder
|
||||
696640 GtkButton: Don't suppress unhandled mouse events
|
||||
698183 Text input is too slow and some keys are broken after c...
|
||||
698758 Wrong limit for "Native Windows wider or taller than 65...
|
||||
700185 GtkWindow: problem with child widget visibility
|
||||
700779 gtk_menu_item_draw puts the arrow too close to the border
|
||||
701332 Patch for minor glitch in NSTextInput
|
||||
701341 Windows only paint once in Weston 1.1
|
||||
701365 Do not assert sm_proxy != NULL in GtkApplication inhibi...
|
||||
701613 XEmbed doesn't work with frame-synced GTK/Mutter
|
||||
702598 Invalid read of size 4 in gtk_icon_info_get_embedded_rect
|
||||
702763 ellipsize placeholder text
|
||||
702913 Reduce hash table lookups in gdk_x11_screen_supports_ne...
|
||||
703069 Opening a big menu activates some menu entry
|
||||
703220 Memory allocation integer overflow in gdk_cairo_set_sou...
|
||||
705181 Annoying beep on arrow keys when using IME on MacOS
|
||||
705182 Reset Cocoa IME state when immodule is reset
|
||||
705320 gtkicontheme: check for GdkPixbuf first
|
||||
705692 Segmentation fault on horizontal slider
|
||||
705750 Quartz input method doesn't work correctly for Chinese...
|
||||
706152 g_object_notify called with NULL priv->focus_widget
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.2
|
||||
=================================
|
||||
|
||||
* Bugs fixed:
|
||||
504901 GtkCellRendererCombo requires click-and-hold
|
||||
695120 GtkMenu and GdkWindow sizes can get out of sync
|
||||
698051 Typo in documentation comment
|
||||
698181 Document icon-shadow CSS property
|
||||
699104 when nothing is selected, Add to Bookmarks is enabled...
|
||||
699239 Choose DnD/tooltip widget better on GtkOverlay and ot...
|
||||
699750 Print dialog crashes when printer does not provide pr...
|
||||
699901 GTK CSS keybinding broken
|
||||
699929 GtkCheckMenuItem: remove an unused boolean field
|
||||
700007 Various small improvements
|
||||
700079 Fix accels added after the window was shown not working
|
||||
|
||||
Translation updates:
|
||||
Brazilian Portuguese
|
||||
German
|
||||
Italian
|
||||
Japanese
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Russian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.1
|
||||
=================================
|
||||
|
||||
* Broadway backend improvements:
|
||||
- Ensure window sizes are synched right
|
||||
- Sync surface updates with paint clock
|
||||
- Add support for password authentication
|
||||
- Reuse surfaces passed to server
|
||||
|
||||
* CSS improvements:
|
||||
- Add cycle detection to color resolving
|
||||
|
||||
* Bug fixes
|
||||
675649 gtk-demo: Fix typo
|
||||
681446 gtkdnd memory leak
|
||||
685419 gtkprintbackendfile: Infinite loop in _cairo_write()
|
||||
685420 Critical warnings when GtkPrintJob is released too early
|
||||
690275 scrolling on other windows is applied when coming back...
|
||||
696370 GtkOverlay doesn't work on top of GtkClutterEmbed
|
||||
696622 gtk option printer widget segfault in epiphany
|
||||
696623 GtkOverlay with a revealer produces warnings setting a...
|
||||
696882 GtkWindow changes size after hide/show cycle
|
||||
697144 Popup menu mnemonics fixes
|
||||
697263 Impossible to set window transparency on 3.8
|
||||
697427 Unreferencing GtkStatusIcon object causes abort
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
British English
|
||||
Catalan (Valencian)
|
||||
Czech
|
||||
Finnish
|
||||
Hungarian
|
||||
Indonesian
|
||||
Interlingua
|
||||
Kannada
|
||||
Malayalam
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Simplified Chinese
|
||||
Slovak
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.8.0
|
||||
=================================
|
||||
|
||||
* Bug fixes
|
||||
674759 GtkLabel: wrong value of "mnemonic-keyval" when...
|
||||
695493 testgtk: issues with the color selection example
|
||||
696051 vertical grid lines in rtl mode
|
||||
696171 GtkAssistant highlighted font unreadable
|
||||
696202 Add GtkSpinner animation back to Win32 theme
|
||||
696232 win32: do not crash on invalid utf8 conversion
|
||||
696405 appchooserbutton: filter out applications not...
|
||||
696546 Fix a crash in gtk_print_backend_cups_finalize()
|
||||
696553 Fix a crash in avahi_create_browsers()
|
||||
Use natural size to set treeview adjustments
|
||||
|
||||
* Translation updates
|
||||
Aragonese
|
||||
Czech
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Gujarati
|
||||
Hindi
|
||||
Hungarian
|
||||
Italian
|
||||
Kazakh
|
||||
Marathi
|
||||
Odia
|
||||
Persian
|
||||
Punjabi
|
||||
Russian
|
||||
Slovenian
|
||||
Tamil
|
||||
Traditional Chinese
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.14
|
||||
==================================
|
||||
|
||||
* A lot of filechooser button fixes
|
||||
|
||||
* Bugs fixed:
|
||||
586367 In local_only mode, file chooser should return native...
|
||||
671939 crash on exit
|
||||
674759 GtkLabel: wrong value of "mnemonic-keyval" when "use-...
|
||||
691040 selection is reported incorrectly in file chooser button
|
||||
694339 Fix build of GTK+ on Windows
|
||||
695200 Switching apps while a combobox open makes the parent...
|
||||
695278 Avoid passing a NULL title to setTitle
|
||||
695304 GtkTextView: don't popdown a bubble if we don't have one
|
||||
695312 Initial 'text' set in the non-numeric-only GtkSpinBut...
|
||||
695375 GtkEntryAccessible: also handle entry icon tooltip NU...
|
||||
695391 wayland documentation section id is "gtk-osx"
|
||||
695473 treeview: fix a critical warning
|
||||
695482 Universal Access panel appears jumbled and horrible a...
|
||||
695682 Cannot build docs for wayland-only build
|
||||
695714 Getting of printer info can hang
|
||||
695715 Use DBus calls instead of Avahi API
|
||||
695772 Different appearance of menus within Audacious
|
||||
695783 GtkApplication: Allow passing windows on non-X11 targets
|
||||
695874 GtkFontChooser docs
|
||||
695948 GtkFontButton sets wrong show-preview-entry
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Assamese
|
||||
Belarusian
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Danish
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Indonesian
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Korean
|
||||
Polish
|
||||
Portuguese
|
||||
Punjabi
|
||||
Serbian
|
||||
Slovenian
|
||||
Spanish
|
||||
Uyghur
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.12
|
||||
==================================
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat
|
||||
echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat
|
||||
|
||||
@@ -20,6 +20,11 @@ ATK and GLib. External dependencies are at least Cairo
|
||||
gettext-runtime, fontconfig*, freetype*, expat*. See the
|
||||
build/win32/vs10/README.txt file in glib for details where to unpack them.
|
||||
|
||||
You will also need a Python 2.x/3.x interpretor installed on your system,
|
||||
which can be obtained from the official installers available from
|
||||
http://www.python.org. Please note that the Python interpretor (python.exe)
|
||||
needs to be in your PATH before attempting the build of GTK+.
|
||||
|
||||
It is recommended that one builds the dependencies with VS10 as far as
|
||||
possible, especially those from and using the GTK+ stack (i.e. GLib,
|
||||
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls
|
||||
|
||||
+15
-22
@@ -2,17 +2,17 @@
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<VSVer>10</VSVer>
|
||||
<GlibEtcInstallRoot>..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
|
||||
<GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
|
||||
<GlibEtcInstallRootFromBuildWin32>..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRootFromBuildWin32>
|
||||
<CopyDir>$(GlibEtcInstallRoot)</CopyDir>
|
||||
<CopyDir>..\..\..\..\vs$(VSVer)\$(Platform)</CopyDir>
|
||||
<DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
|
||||
<ApiVersion>3.0</ApiVersion>
|
||||
<GtkBinaryVersion>3.0.0</GtkBinaryVersion>
|
||||
<GtkDummyPrefix>\"/dummy\"</GtkDummyPrefix>
|
||||
<GtkPrefixDefine>GTK_PREFIX="\"$(GtkDummyPrefix)\""</GtkPrefixDefine>
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="\"Gdk\""</GdkDefines>
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
|
||||
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="\"Gtk\"";GTK_HOST="\"i686-pc-vs$(VSVer)\"";GTK_PRINT_BACKENDS="\"file\"";GTK_PRINT_PREVIEW_COMMAND="\"undefined-gtk-print-preview-command\"";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="\"$(GtkDummyPrefix)/lib\"";GTK_DATADIR="\"$(GtkDummyPrefix)/share\"";GTK_DATA_PREFIX="\"$(GtkDummyPrefix)\"";GTK_SYSCONFDIR="\"$(GtkDummyPrefix)/etc\"";MULTIPRESS_CONFDIR="\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\"";MULTIPRESS_LOCALEDIR="\"$(GtkDummyPrefix)/share/locale\"";GTK_VERSION="\"$(GtkVersion)/etc\"";GTK_BINARY_VERSION="\"$(GtkBinaryVersion)/etc\"";GDK_DISABLE_DEPRECATED</GtkDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED</GtkDefines>
|
||||
<GtkDoInstall>
|
||||
echo on
|
||||
|
||||
@@ -23,23 +23,6 @@ copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
|
||||
copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
|
||||
|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
|
||||
mkdir $(CopyDir)\lib
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
|
||||
@@ -593,7 +576,7 @@ copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
||||
|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
@@ -727,6 +710,13 @@ cd vs$(VSVer)
|
||||
</DoGenGir>
|
||||
<GtkGenerateGdkDef>echo EXPORTS >"$(DefDir)\gdk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols >>"$(DefDir)\gdk.def"</GtkGenerateGdkDef>
|
||||
<GtkGenerateGtkDef>echo EXPORTS >"$(DefDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(DefDir)\gtk.def"</GtkGenerateGtkDef>
|
||||
<GenerateGtkDbusBuiltSources>
|
||||
cd ..\..\..\gtk
|
||||
|
||||
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
|
||||
|
||||
cd $(SolutionDir)
|
||||
</GenerateGtkDbusBuiltSources>
|
||||
<GtkLibtoolCompatibleDllPrefix>lib</GtkLibtoolCompatibleDllPrefix>
|
||||
<GtkLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GtkLibtoolCompatibleDllSuffix>
|
||||
<GtkSeparateVSDllPrefix />
|
||||
@@ -812,6 +802,9 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
|
||||
<BuildMacro Include="GtkGenerateGtkDef">
|
||||
<Value>$(GtkGenerateGtkDef)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkDbusBuiltSources">
|
||||
<Value>$(GenerateGtkDbusBuiltSources)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkLibtoolCompatibleDllPrefix">
|
||||
<Value>$(GtkLibtoolCompatibleDllPrefix)</Value>
|
||||
</BuildMacro>
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
<ClCompile Include="..\..\..\modules\input\thai-charprop.c"><Filter>Source Files</Filter></ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\gdk\gtk.symbols">
|
||||
<Filter>Resource Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gdk\gtk.symbols"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -177,6 +177,20 @@
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkGenerateGtkDef)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)gtk.def;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc" />
|
||||
@@ -212,4 +226,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -19,6 +19,11 @@ ATK and GLib. External dependencies are at least Cairo
|
||||
gettext-runtime, fontconfig*, freetype*, expat*. See the
|
||||
build/win32/vs9/README.txt file in glib for details where to unpack them.
|
||||
|
||||
You will also need a Python 2.x/3.x interpretor installed on your system,
|
||||
which can be obtained from the official installers available from
|
||||
http://www.python.org. Please note that the Python interpretor (python.exe)
|
||||
needs to be in your PATH before attempting the build of GTK+.
|
||||
|
||||
It is recommended that one builds the dependencies with VS9 as far as
|
||||
possible, especially those from and using the GTK+ stack (i.e. GLib,
|
||||
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls
|
||||
|
||||
@@ -33,7 +33,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
/>
|
||||
<UserMacro
|
||||
Name="GlibEtcInstallRoot"
|
||||
Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
|
||||
Value="$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(PlatformName)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GlibEtcInstallRootFromBuildWin32"
|
||||
@@ -41,7 +41,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
/>
|
||||
<UserMacro
|
||||
Name="CopyDir"
|
||||
Value="$(GlibEtcInstallRoot)"
|
||||
Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="ApiVersion"
|
||||
@@ -79,16 +79,6 @@ mkdir $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
|
||||
mkdir $(CopyDir)\lib

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib

|
||||
|
||||
@@ -369,7 +359,7 @@ copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
||||
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
@@ -455,6 +445,14 @@ cd vs$(VSVer)

|
||||
Name="GtkGenerateGtkDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkDbusBuiltSources"
|
||||
Value="
|
||||
cd ..\..\..\gtk

|
||||
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml

|
||||
cd $(SolutionDir)

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkLibtoolCompatibleDllPrefix"
|
||||
Value="lib"
|
||||
|
||||
@@ -210,6 +210,36 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\gtkdbusinterfaces.xml">
|
||||
<FileConfiguration Name="Debug|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
|
||||
</Filter>
|
||||
<Filter
|
||||
|
||||
+8
-46
@@ -9,9 +9,9 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [7])
|
||||
m4_define([gtk_micro_version], [13])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_minor_version], [8])
|
||||
m4_define([gtk_micro_version], [10])
|
||||
m4_define([gtk_interface_age], [10])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -350,7 +350,7 @@ if test "$enable_win32_backend" = "yes"; then
|
||||
backend_immodules="$backend_immodules,ime"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WIN32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
@@ -361,6 +361,7 @@ DISABLE_ON_QUARTZ=''
|
||||
if test "x$enable_quartz_backend" = xyes; then
|
||||
cairo_backends="$cairo_backends cairo-quartz"
|
||||
GDK_BACKENDS="$GDK_BACKENDS quartz"
|
||||
backend_immodules="$backend_immodules,quartz"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_QUARTZ"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
|
||||
@@ -875,6 +876,7 @@ AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_QUARTZ, [test x"$INCLUDE_quartz" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
|
||||
@@ -1085,7 +1087,6 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
@@ -1093,6 +1094,8 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
X_EXTENSIONS="$X_EXTENSIONS Xinerama"
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
@@ -1242,7 +1245,6 @@ if test "$have_gio_unix" = "yes"; then
|
||||
else
|
||||
GDK_GIO_PACKAGE=gio-2.0
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GIO_UNIX, test "$have_gio_unix" = "yes")
|
||||
|
||||
# Check for Pango flags
|
||||
|
||||
@@ -1455,45 +1457,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for Avahi flags
|
||||
AC_ARG_ENABLE(avahi-browsing,
|
||||
[AS_HELP_STRING([--disable-avahi-browsing],
|
||||
[disable avahi browsing of printers])],,
|
||||
[enable_avahi_browsing=auto])
|
||||
|
||||
have_avahi_browsing=no
|
||||
if test "x$enable_avahi_browsing" != "xno" -a \
|
||||
"x$have_cups_api_1_6" = "xyes"; then
|
||||
AC_MSG_CHECKING([avahi-gobject])
|
||||
|
||||
if $PKG_CONFIG --exists avahi-gobject ; then
|
||||
AVAHI_CFLAGS=`$PKG_CONFIG --cflags avahi-gobject`
|
||||
AC_SUBST(AVAHI_CFLAGS)
|
||||
AVAHI_LIBS=`$PKG_CONFIG --libs avahi-gobject`
|
||||
AC_SUBST(AVAHI_LIBS)
|
||||
have_avahi_gobject=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "x$have_avahi_gobject" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_AVAHI_BROWSING], [1], [Define to 1 if avahi-gobject available])
|
||||
have_avahi_browsing=yes
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** avahi-gobject not found. avahi-gobject is required to build GTK+ with support
|
||||
*** for avahi browsed printers when using CUPS 1.6.
|
||||
])
|
||||
fi
|
||||
else
|
||||
if test "x$enable_avahi_browsing" = "xyes"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Avahi browsing support requested but CUPS 1.6 not found.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with PAPI backend for GTK+
|
||||
#
|
||||
|
||||
@@ -1870,7 +1833,6 @@ echo " Dynamic modules: $build_dynamic_modules"
|
||||
echo " Included immodules: $included_immodules"
|
||||
echo " PackageKit support: $build_packagekit"
|
||||
echo " colord support: $have_colord"
|
||||
echo " Avahi browsing: $have_avahi_browsing"
|
||||
echo " Introspection: $found_introspection"
|
||||
echo " Debugging: $enable_debug"
|
||||
echo " Documentation: $enable_gtk_doc"
|
||||
|
||||
+11
-6
@@ -403,7 +403,7 @@ static GtkWidget *create_text (GtkWidget **text_view, gboolean is_source);
|
||||
static void
|
||||
add_data_tab (const gchar *demoname)
|
||||
{
|
||||
gchar *resource_dir, *resource_name, *content_type;
|
||||
gchar *resource_dir, *resource_name, *content_type, *content_mime;
|
||||
gchar **resources;
|
||||
GBytes *bytes;
|
||||
GtkWidget *widget, *label;
|
||||
@@ -427,17 +427,20 @@ add_data_tab (const gchar *demoname)
|
||||
g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes),
|
||||
NULL);
|
||||
content_mime = g_content_type_get_mime_type (content_type);
|
||||
|
||||
/* In theory we should look at all the mime types gdk-pixbuf supports
|
||||
* and go from there, but we know what file types we've added.
|
||||
*/
|
||||
if (g_content_type_is_a (content_type, "image/png") ||
|
||||
g_content_type_is_a (content_type, "image/gif") ||
|
||||
g_content_type_is_a (content_type, "image/jpeg"))
|
||||
if (g_content_type_is_a (content_mime, "image/png") ||
|
||||
g_content_type_is_a (content_mime, "image/gif") ||
|
||||
g_content_type_is_a (content_mime, "image/jpeg"))
|
||||
{
|
||||
widget = gtk_image_new_from_resource (resource_name);
|
||||
}
|
||||
else if (g_content_type_is_a (content_type, "text/plain"))
|
||||
else if (g_content_type_is_a (content_mime, "text/plain") ||
|
||||
g_content_type_is_a (content_mime, "application/x-ext-ui") ||
|
||||
g_content_type_is_a (content_mime, "text/css"))
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkWidget *textview;
|
||||
@@ -449,7 +452,8 @@ add_data_tab (const gchar *demoname)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_type);
|
||||
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_mime);
|
||||
widget = NULL;
|
||||
}
|
||||
|
||||
@@ -458,6 +462,7 @@ add_data_tab (const gchar *demoname)
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||
|
||||
g_free (content_mime);
|
||||
g_free (content_type);
|
||||
g_free (resource_name);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
@@ -85,7 +85,7 @@ scroll_to_bottom (GtkTextView *textview)
|
||||
gtk_text_iter_set_line_offset (&iter, 0);
|
||||
|
||||
/* and place the mark at iter. the mark will stay there after we
|
||||
* insert some text at the end because it has right gravity.
|
||||
* insert some text at the end because it has left gravity.
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "scroll");
|
||||
gtk_text_buffer_move_mark (buffer, mark, &iter);
|
||||
|
||||
@@ -22,6 +22,7 @@ struct _CanvasItem
|
||||
gdouble x, y;
|
||||
};
|
||||
|
||||
static gboolean drag_data_requested_for_drop = FALSE;
|
||||
static CanvasItem *drop_item = NULL;
|
||||
static GList *canvas_items = NULL;
|
||||
|
||||
@@ -266,6 +267,7 @@ interactive_canvas_drag_motion (GtkWidget *widget,
|
||||
if (!target)
|
||||
return FALSE;
|
||||
|
||||
drag_data_requested_for_drop = FALSE;
|
||||
gtk_drag_get_data (widget, context, target, time);
|
||||
}
|
||||
|
||||
@@ -295,16 +297,36 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
|
||||
selection);
|
||||
|
||||
/* create a drop indicator when a tool button was found */
|
||||
/* create a canvas item when a tool button was found */
|
||||
|
||||
g_assert (NULL == drop_item);
|
||||
|
||||
if (GTK_IS_TOOL_ITEM (tool_item))
|
||||
if (!GTK_IS_TOOL_ITEM (tool_item))
|
||||
return;
|
||||
|
||||
if (drop_item)
|
||||
{
|
||||
drop_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
canvas_item_free (drop_item);
|
||||
drop_item = NULL;
|
||||
}
|
||||
|
||||
CanvasItem *item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
|
||||
/* Either create a new item or just create a preview item,
|
||||
depending on why the drag data was requested. */
|
||||
if(drag_data_requested_for_drop)
|
||||
{
|
||||
canvas_items = g_list_append (canvas_items, item);
|
||||
drop_item = NULL;
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
} else
|
||||
{
|
||||
drop_item = item;
|
||||
gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
}
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -315,29 +337,19 @@ interactive_canvas_drag_drop (GtkWidget *widget,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
/* turn the drop indicator into a real canvas item */
|
||||
GdkAtom target = gtk_drag_dest_find_target (widget, context, NULL);
|
||||
|
||||
drop_item->x = x;
|
||||
drop_item->y = y;
|
||||
if (!target)
|
||||
return FALSE;
|
||||
|
||||
canvas_items = g_list_append (canvas_items, drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
/* signal the item was accepted and redraw */
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
drag_data_requested_for_drop = TRUE;
|
||||
gtk_drag_get_data (widget, context, target, time);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interactive_canvas_real_drag_leave (gpointer data)
|
||||
static void
|
||||
interactive_canvas_drag_leave (gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
@@ -346,20 +358,9 @@ interactive_canvas_real_drag_leave (gpointer data)
|
||||
canvas_item_free (drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
if (widget)
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
interactive_canvas_drag_leave (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
/* defer cleanup until a potential "drag-drop" signal was received */
|
||||
g_idle_add (interactive_canvas_real_drag_leave, widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -591,7 +592,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, contents,
|
||||
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
|
||||
NULL);
|
||||
|
||||
|
||||
@@ -54,6 +54,15 @@ Start your applications like this:
|
||||
BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
</programlisting>
|
||||
|
||||
You can add password protection for your session by creating a file in
|
||||
<filename>$XDG_CONFIG_HOME/broadway.passwd</filename> or <filename>$HOME/.config/broadway.passwd</filename>
|
||||
with a crypt(3) style password hash.
|
||||
|
||||
A simple way to generate it is with openssl:
|
||||
<programlisting>
|
||||
openssl passwd -1 > ~/.config/broadway.passwd
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ broadwayd_SOURCES = \
|
||||
broadway-output.h \
|
||||
broadway-output.c
|
||||
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt -lcrypt
|
||||
|
||||
MAINTAINERCLEANFILES = $(broadway_built_sources)
|
||||
EXTRA_DIST += $(broadway_built_sources)
|
||||
|
||||
@@ -317,6 +317,13 @@ broadway_output_get_next_serial (BroadwayOutput *output)
|
||||
return output->serial;
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial)
|
||||
{
|
||||
output->serial = serial;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* Core rendering operations *
|
||||
@@ -471,6 +478,24 @@ broadway_output_new_surface(BroadwayOutput *output,
|
||||
append_bool (output, is_temp);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_request_auth (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_REQUEST_AUTH);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_auth_ok (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_AUTH_OK);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_disconnected (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_DISCONNECTED);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_show_surface(BroadwayOutput *output, int id)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@ BroadwayOutput *broadway_output_new (GOutputStream *out,
|
||||
void broadway_output_free (BroadwayOutput *output);
|
||||
int broadway_output_flush (BroadwayOutput *output);
|
||||
int broadway_output_has_error (BroadwayOutput *output);
|
||||
void broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial);
|
||||
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
|
||||
void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int id,
|
||||
@@ -31,6 +33,9 @@ void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int w,
|
||||
int h,
|
||||
gboolean is_temp);
|
||||
void broadway_output_request_auth (BroadwayOutput *output);
|
||||
void broadway_output_auth_ok (BroadwayOutput *output);
|
||||
void broadway_output_disconnected (BroadwayOutput *output);
|
||||
void broadway_output_show_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_hide_surface (BroadwayOutput *output,
|
||||
|
||||
@@ -36,6 +36,9 @@ typedef enum {
|
||||
BROADWAY_OP_SET_TRANSIENT_FOR = 'p',
|
||||
BROADWAY_OP_PUT_RGB = 'i',
|
||||
BROADWAY_OP_FLUSH = 'f',
|
||||
BROADWAY_OP_REQUEST_AUTH = 'l',
|
||||
BROADWAY_OP_AUTH_OK = 'L',
|
||||
BROADWAY_OP_DISCONNECTED = 'D',
|
||||
} BroadwayOpType;
|
||||
|
||||
typedef struct {
|
||||
@@ -160,7 +163,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
char name[34];
|
||||
char name[36];
|
||||
guint32 width;
|
||||
guint32 height;
|
||||
} BroadwayRequestUpdate;
|
||||
|
||||
+198
-37
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "broadway-output.h"
|
||||
|
||||
#define _XOPEN_SOURCE /* for crypt */
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include "gdktypes.h"
|
||||
@@ -9,6 +11,10 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <crypt.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -19,6 +25,7 @@ typedef struct BroadwayWindow BroadwayWindow;
|
||||
struct _BroadwayServer {
|
||||
GObject parent_instance;
|
||||
|
||||
char *password;
|
||||
char *address;
|
||||
int port;
|
||||
GSocketService *service;
|
||||
@@ -69,6 +76,7 @@ typedef struct HttpRequest {
|
||||
|
||||
struct BroadwayInput {
|
||||
BroadwayServer *server;
|
||||
BroadwayOutput *output;
|
||||
GSocketConnection *connection;
|
||||
GByteArray *buffer;
|
||||
GSource *source;
|
||||
@@ -76,6 +84,7 @@ struct BroadwayInput {
|
||||
gint64 time_base;
|
||||
gboolean proto_v7_plus;
|
||||
gboolean binary;
|
||||
gboolean active;
|
||||
};
|
||||
|
||||
struct BroadwayWindow {
|
||||
@@ -90,6 +99,9 @@ struct BroadwayWindow {
|
||||
gint32 transient_for;
|
||||
|
||||
cairo_surface_t *last_surface;
|
||||
|
||||
char *cached_surface_name;
|
||||
cairo_surface_t *cached_surface;
|
||||
};
|
||||
|
||||
static void broadway_server_resync_windows (BroadwayServer *server);
|
||||
@@ -100,6 +112,8 @@ static void
|
||||
broadway_server_init (BroadwayServer *server)
|
||||
{
|
||||
BroadwayWindow *root;
|
||||
char *passwd_file;
|
||||
char *password, *p;
|
||||
|
||||
server->service = g_socket_service_new ();
|
||||
server->pointer_grab_window_id = -1;
|
||||
@@ -108,6 +122,22 @@ broadway_server_init (BroadwayServer *server)
|
||||
server->id_ht = g_hash_table_new (NULL, NULL);
|
||||
server->id_counter = 0;
|
||||
|
||||
passwd_file = g_build_filename (g_get_user_config_dir (),
|
||||
"broadway.passwd", NULL);
|
||||
|
||||
if (g_file_get_contents (passwd_file,
|
||||
&password, NULL, NULL))
|
||||
{
|
||||
p = strchr (password, '\n');
|
||||
if (p)
|
||||
*p = 0;
|
||||
g_strstrip (password);
|
||||
if (strlen (password) > 3)
|
||||
server->password = password;
|
||||
else
|
||||
g_free (password);
|
||||
}
|
||||
|
||||
root = g_new0 (BroadwayWindow, 1);
|
||||
root->id = server->id_counter++;
|
||||
root->width = 1024;
|
||||
@@ -139,7 +169,7 @@ broadway_server_class_init (BroadwayServerClass * class)
|
||||
object_class->finalize = broadway_server_finalize;
|
||||
}
|
||||
|
||||
static void start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary);
|
||||
static void start (BroadwayInput *input);
|
||||
|
||||
static void
|
||||
http_request_free (HttpRequest *request)
|
||||
@@ -349,6 +379,14 @@ update_future_pointer_info (BroadwayServer *server, BroadwayInputPointerMsg *dat
|
||||
server->future_mouse_in_toplevel = data->mouse_window_id;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
verify_password (BroadwayServer *server, const char *password)
|
||||
{
|
||||
char *hash;
|
||||
hash = crypt (password, server->password);
|
||||
return strcmp (hash, server->password) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
parse_input_message (BroadwayInput *input, const char *message)
|
||||
{
|
||||
@@ -357,6 +395,22 @@ parse_input_message (BroadwayInput *input, const char *message)
|
||||
char *p;
|
||||
gint64 time_;
|
||||
|
||||
if (!input->active)
|
||||
{
|
||||
/* The input has not been activated yet, handle auth/start */
|
||||
|
||||
if (message[0] != 'l' ||
|
||||
!verify_password (server, message+1))
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&msg, 0, sizeof (msg));
|
||||
|
||||
p = (char *)message;
|
||||
@@ -570,7 +624,7 @@ parse_input (BroadwayInput *input)
|
||||
}
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PING:
|
||||
broadway_output_pong (server->output);
|
||||
broadway_output_pong (input->output);
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PONG:
|
||||
break; /* we never send pings, but tolerate pongs */
|
||||
@@ -596,7 +650,8 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (buf[0] != 0)
|
||||
{
|
||||
server->input = NULL;
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
return;
|
||||
}
|
||||
@@ -613,7 +668,8 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (len > 0 && buf[0] != 0)
|
||||
{
|
||||
server->input = NULL;
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
break;
|
||||
}
|
||||
@@ -640,19 +696,16 @@ queue_process_input_at_idle (BroadwayServer *server)
|
||||
}
|
||||
|
||||
static void
|
||||
broadway_server_read_all_input_nonblocking (BroadwayServer *server)
|
||||
broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
{
|
||||
GInputStream *in;
|
||||
gssize res;
|
||||
guint8 buffer[1024];
|
||||
GError *error;
|
||||
BroadwayInput *input;
|
||||
|
||||
if (server->input == NULL)
|
||||
if (input == NULL)
|
||||
return;
|
||||
|
||||
input = server->input;
|
||||
|
||||
in = g_io_stream_get_input_stream (G_IO_STREAM (input->connection));
|
||||
|
||||
error = NULL;
|
||||
@@ -668,7 +721,8 @@ broadway_server_read_all_input_nonblocking (BroadwayServer *server)
|
||||
return;
|
||||
}
|
||||
|
||||
server->input = NULL;
|
||||
if (input->server->input == input)
|
||||
input->server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
if (res < 0)
|
||||
{
|
||||
@@ -686,7 +740,7 @@ broadway_server_read_all_input_nonblocking (BroadwayServer *server)
|
||||
static void
|
||||
broadway_server_consume_all_input (BroadwayServer *server)
|
||||
{
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
broadway_server_read_all_input_nonblocking (server->input);
|
||||
|
||||
/* Since we're parsing input but not processing the resulting messages
|
||||
we might not get a readable callback on the stream, so queue an idle to
|
||||
@@ -701,9 +755,10 @@ input_data_cb (GObject *stream,
|
||||
{
|
||||
BroadwayServer *server = input->server;
|
||||
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
broadway_server_read_all_input_nonblocking (input);
|
||||
|
||||
process_input_messages (server);
|
||||
if (input->active)
|
||||
process_input_messages (server);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -878,15 +933,14 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
gsize len;
|
||||
GChecksum *checksum;
|
||||
char *origin, *host;
|
||||
BroadwayServer *server;
|
||||
BroadwayInput *input;
|
||||
const void *data_buffer;
|
||||
gsize data_buffer_size;
|
||||
GInputStream *in;
|
||||
char *key_v7;
|
||||
gboolean proto_v7_plus;
|
||||
|
||||
server = request->server;
|
||||
GSocket *socket;
|
||||
int flag = 1;
|
||||
|
||||
#ifdef DEBUG_WEBSOCKETS
|
||||
g_print ("incoming request:\n%s\n", request->request->str);
|
||||
@@ -1033,15 +1087,11 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
proto_v7_plus = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt (g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
|
||||
input = g_new0 (BroadwayInput, 1);
|
||||
|
||||
input->server = request->server;
|
||||
input->connection = g_object_ref (request->connection);
|
||||
input->proto_v7_plus = proto_v7_plus;
|
||||
@@ -1051,9 +1101,9 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
input->buffer = g_byte_array_sized_new (data_buffer_size);
|
||||
g_byte_array_append (input->buffer, data_buffer, data_buffer_size);
|
||||
|
||||
server->input = input;
|
||||
|
||||
start_output (request, proto_v7_plus, binary);
|
||||
input->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
0, proto_v7_plus, binary);
|
||||
|
||||
/* This will free and close the data input stream, but we got all the buffered content already */
|
||||
http_request_free (request);
|
||||
@@ -1063,35 +1113,53 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
g_source_set_callback (input->source, (GSourceFunc)input_data_cb, input, NULL);
|
||||
g_source_attach (input->source, NULL);
|
||||
|
||||
if (input->server->password)
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
/* Process any data in the pipe already */
|
||||
parse_input (input);
|
||||
process_input_messages (server);
|
||||
|
||||
g_strfreev (lines);
|
||||
}
|
||||
|
||||
static void
|
||||
start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
|
||||
start (BroadwayInput *input)
|
||||
{
|
||||
GSocket *socket;
|
||||
BroadwayServer *server;
|
||||
int flag = 1;
|
||||
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt(g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
input->active = TRUE;
|
||||
|
||||
server = BROADWAY_SERVER (request->server);
|
||||
server = BROADWAY_SERVER (input->server);
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
broadway_output_disconnected (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
}
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
|
||||
server->input = input;
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
server->saved_serial = broadway_output_get_next_serial (server->output);
|
||||
broadway_output_free (server->output);
|
||||
}
|
||||
server->output = input->output;
|
||||
|
||||
server->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
server->saved_serial, proto_v7_plus, binary);
|
||||
broadway_output_set_next_serial (server->output, server->saved_serial);
|
||||
broadway_output_auth_ok (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
|
||||
broadway_server_resync_windows (server);
|
||||
|
||||
@@ -1099,6 +1167,8 @@ start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
|
||||
broadway_output_grab_pointer (server->output,
|
||||
server->pointer_grab_window_id,
|
||||
server->pointer_grab_owner_events);
|
||||
|
||||
process_input_messages (server);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1349,6 +1419,12 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
server->toplevels = g_list_remove (server->toplevels, window);
|
||||
g_hash_table_remove (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
|
||||
g_free (window);
|
||||
}
|
||||
}
|
||||
@@ -1583,6 +1659,11 @@ broadway_server_window_update (BroadwayServer *server,
|
||||
window->width,
|
||||
window->height);
|
||||
|
||||
g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
|
||||
g_assert (window->width == cairo_image_surface_get_width (surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (surface));
|
||||
|
||||
if (server->output != NULL)
|
||||
{
|
||||
if (window->last_synced)
|
||||
@@ -1739,6 +1820,86 @@ broadway_server_ungrab_pointer (BroadwayServer *server,
|
||||
return serial;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
window = g_hash_table_lookup (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window == NULL)
|
||||
return NULL;
|
||||
|
||||
if (window->cached_surface_name != NULL &&
|
||||
strcmp (name, window->cached_surface_name) == 0)
|
||||
return cairo_surface_reference (window->cached_surface);
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
shm_unlink (name);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
window->cached_surface_name = g_strdup (name);
|
||||
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
window->cached_surface = cairo_surface_reference (surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
guint32
|
||||
broadway_server_new_window (BroadwayServer *server,
|
||||
int x,
|
||||
|
||||
@@ -78,5 +78,10 @@ gboolean broadway_server_window_move_resize (BroadwayServer *
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
cairo_surface_t * broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
||||
+71
-45
@@ -225,34 +225,16 @@ function flushSurface(surface)
|
||||
context.save();
|
||||
context.beginPath();
|
||||
|
||||
var minx;
|
||||
var miny;
|
||||
var maxx;
|
||||
var maxy;
|
||||
for (var j = 0; j < cmd.rects.length; j++) {
|
||||
var rect = cmd.rects[j];
|
||||
context.rect(rect.x, rect.y, rect.w, rect.h);
|
||||
if (j == 0) {
|
||||
minx = rect.x;
|
||||
miny = rect.y;
|
||||
maxx = rect.x + rect.w;
|
||||
maxy = rect.y + rect.h;
|
||||
} else {
|
||||
if (rect.x < minx)
|
||||
minx = rect.x;
|
||||
if (rect.y < miny)
|
||||
miny = rect.y;
|
||||
if (rect.x + rect.w > maxx)
|
||||
maxx = rect.x + rect.w;
|
||||
if (rect.y + rect.h > maxy)
|
||||
maxy = rect.y + rect.h;
|
||||
}
|
||||
}
|
||||
context.clip();
|
||||
context.globalCompositeOperation = "copy";
|
||||
context.drawImage(context.canvas,
|
||||
minx - cmd.dx, miny - cmd.dy, maxx - minx, maxy - miny,
|
||||
minx, miny, maxx - minx, maxy - miny);
|
||||
// This seems to break chrome when src overlaps dest
|
||||
// But source-over should be fine for rgb surfaces anyway
|
||||
//context.globalCompositeOperation = "copy";
|
||||
context.drawImage(surface.canvas,
|
||||
cmd.dx, cmd.dy);
|
||||
context.restore();
|
||||
break;
|
||||
|
||||
@@ -496,12 +478,6 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
|
||||
var xOffset = surface.x;
|
||||
var yOffset = surface.y;
|
||||
|
||||
var transientToplevel = getTransientToplevel(surface);
|
||||
if (transientToplevel) {
|
||||
xOffset = surface.x - transientToplevel.x;
|
||||
yOffset = surface.y - transientToplevel.y;
|
||||
}
|
||||
|
||||
var element = surface.canvas;
|
||||
if (surface.frame) {
|
||||
element = surface.frame;
|
||||
@@ -543,6 +519,21 @@ function handleCommands(cmd)
|
||||
var command = cmd.get_char();
|
||||
lastSerial = cmd.get_32();
|
||||
switch (command) {
|
||||
case 'l':
|
||||
login ();
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
if (loginDiv != null)
|
||||
loginDiv.parentNode.removeChild(loginDiv);
|
||||
start ();
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
break;
|
||||
|
||||
case 's': // create new surface
|
||||
id = cmd.get_16();
|
||||
x = cmd.get_16s();
|
||||
@@ -742,8 +733,12 @@ BinCommands.prototype.get_32 = function() {
|
||||
};
|
||||
BinCommands.prototype.get_image_url = function() {
|
||||
var size = this.get_32();
|
||||
var png_blob = new Blob ([this.arraybuffer.slice (this.pos, this.pos + size)], {type:"image/png"});
|
||||
var url = URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
var png_blob = new Blob ([new Uint8Array (this.arraybuffer, this.pos, size)], {type:"image/png"});
|
||||
var url;
|
||||
if (window.webkitURL)
|
||||
url = window.webkitURL.createObjectURL(png_blob);
|
||||
else
|
||||
url = window.URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
this.pos = this.pos + size;
|
||||
return url;
|
||||
};
|
||||
@@ -2590,7 +2585,7 @@ function onMouseWheel(ev)
|
||||
var id = getSurfaceId(ev);
|
||||
var pos = getPositionsFromEvent(ev, id);
|
||||
|
||||
var offset = ev.detail ? ev.detail : ev.wheelDelta;
|
||||
var offset = ev.detail ? ev.detail : -ev.wheelDelta;
|
||||
var dir = 0;
|
||||
if (offset > 0)
|
||||
dir = 1;
|
||||
@@ -2631,6 +2626,47 @@ function newWS(loc) {
|
||||
return ws;
|
||||
}
|
||||
|
||||
function start()
|
||||
{
|
||||
setupDocument(document);
|
||||
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
}
|
||||
|
||||
var loginDiv = null;
|
||||
function login()
|
||||
{
|
||||
if (loginDiv == null) {
|
||||
var div = document.createElement('div');
|
||||
document.body.appendChild(div);
|
||||
div.innerHTML = "Please enter password<br>";
|
||||
div.style.marginTop = "40px";
|
||||
div.style.textAlign = "center";
|
||||
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "password");
|
||||
div.appendChild(input);
|
||||
input.focus ();
|
||||
input.onkeyup = function(e) {
|
||||
if (e.keyCode === 13 && input.value != "") {
|
||||
inputSocket.send ("l" + input.value);
|
||||
}
|
||||
}
|
||||
loginDiv = div;
|
||||
} else {
|
||||
alert ("Wrong password");
|
||||
}
|
||||
}
|
||||
|
||||
function connect()
|
||||
{
|
||||
var url = window.location.toString();
|
||||
@@ -2639,7 +2675,7 @@ function connect()
|
||||
var params = query_string[1].split("&");
|
||||
}
|
||||
|
||||
var loc = window.location.toString().replace("http:", "ws:");
|
||||
var loc = window.location.toString().replace("http:", "ws:").replace("https:", "wss:");
|
||||
loc = loc.substr(0, loc.lastIndexOf('/')) + "/socket";
|
||||
|
||||
var supports_binary = newWS (loc + "-test").binaryType == "blob";
|
||||
@@ -2652,23 +2688,13 @@ function connect()
|
||||
|
||||
ws.onopen = function() {
|
||||
inputSocket = ws;
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
ws.onclose = function() {
|
||||
if (inputSocket != null)
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
};
|
||||
ws.onmessage = function(event) {
|
||||
handleMessage(event.data);
|
||||
};
|
||||
|
||||
setupDocument(document);
|
||||
}
|
||||
|
||||
@@ -140,62 +140,6 @@ region_from_rects (BroadwayRect *rects, int n_rects)
|
||||
return region;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
open_surface (char *name, int width, int height)
|
||||
{
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
void
|
||||
add_client_serial_mapping (BroadwayClient *client,
|
||||
guint32 client_serial,
|
||||
@@ -337,9 +281,11 @@ client_handle_request (BroadwayClient *client,
|
||||
cairo_region_destroy (area);
|
||||
break;
|
||||
case BROADWAY_REQUEST_UPDATE:
|
||||
surface = open_surface (request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
surface = broadway_server_open_surface (server,
|
||||
request->update.id,
|
||||
request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
if (surface != NULL)
|
||||
{
|
||||
broadway_server_window_update (server,
|
||||
@@ -409,7 +355,6 @@ client_fill_cb (GObject *source_object,
|
||||
guint32 size;
|
||||
gsize count, remaining;
|
||||
guint8 *buffer;
|
||||
BroadwayRequest request;
|
||||
|
||||
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
|
||||
|
||||
@@ -417,14 +362,10 @@ client_fill_cb (GObject *source_object,
|
||||
while (remaining >= sizeof (guint32))
|
||||
{
|
||||
memcpy (&size, buffer, sizeof (guint32));
|
||||
|
||||
|
||||
if (size <= remaining)
|
||||
{
|
||||
g_assert (size >= sizeof (BroadwayRequestBase));
|
||||
g_assert (size <= sizeof (BroadwayRequest));
|
||||
|
||||
memcpy (&request, buffer, size);
|
||||
client_handle_request (client, &request);
|
||||
client_handle_request (client, (BroadwayRequest *)buffer);
|
||||
|
||||
remaining -= size;
|
||||
buffer += size;
|
||||
|
||||
@@ -506,7 +506,7 @@ make_valid_fs_char (char c)
|
||||
{
|
||||
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
|
||||
|
||||
return chars[c % sizeof (chars)];
|
||||
return chars[c % (sizeof (chars) - 1)];
|
||||
}
|
||||
|
||||
/* name must have at least space for 34 bytes */
|
||||
@@ -550,7 +550,7 @@ create_random_shm (char *name)
|
||||
static const cairo_user_data_key_t gdk_broadway_shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
char name[34];
|
||||
char name[36];
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} BroadwayShmSurfaceData;
|
||||
@@ -582,6 +582,13 @@ _gdk_broadway_server_create_surface (int width,
|
||||
res = ftruncate (fd, data->data_size);
|
||||
g_assert (res != -1);
|
||||
|
||||
res = posix_fallocate (fd, 0, data->data_size);
|
||||
if (res != 0)
|
||||
{
|
||||
shm_unlink (data->name);
|
||||
g_error ("Not enough shared memory for window surface");
|
||||
}
|
||||
|
||||
data->data = mmap(0, data->data_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
@@ -610,7 +617,7 @@ _gdk_broadway_server_window_update (GdkBroadwayServer *server,
|
||||
g_assert (data != NULL);
|
||||
|
||||
msg.id = id;
|
||||
memcpy (msg.name, data->name, 34);
|
||||
memcpy (msg.name, data->name, 36);
|
||||
msg.width = cairo_image_surface_get_width (surface);
|
||||
msg.height = cairo_image_surface_get_height (surface);
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
if (root_y)
|
||||
*root_y = device_root_y;
|
||||
if (win_x)
|
||||
*win_x = device_root_y - toplevel->x;
|
||||
*win_x = device_root_x - toplevel->x;
|
||||
if (win_y)
|
||||
*win_y = device_root_y - toplevel->y;
|
||||
if (mask)
|
||||
@@ -211,6 +211,29 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDeviceManager *device_manager;
|
||||
GList *devices, *d;
|
||||
|
||||
device_manager = gdk_display_get_device_manager (display);
|
||||
|
||||
/* Get all devices */
|
||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
|
||||
|
||||
/* End all grabs on the newly hidden window */
|
||||
for (d = devices; d; d = d->next)
|
||||
_gdk_display_end_device_grab (display, d->data, serial, window, TRUE);
|
||||
|
||||
g_list_free (devices);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_destroy (GdkWindow *window)
|
||||
{
|
||||
|
||||
@@ -66,6 +66,8 @@ struct _GdkBroadwayDisplay
|
||||
GdkWindow *active_offscreen_window;
|
||||
|
||||
GdkBroadwayServer *server;
|
||||
|
||||
gpointer move_resize_data;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDisplayClass
|
||||
|
||||
@@ -247,7 +247,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
break;
|
||||
case BROADWAY_EVENT_GRAB_NOTIFY:
|
||||
case BROADWAY_EVENT_UNGRAB_NOTIFY:
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, NULL, message->base.serial);
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, display->core_pointer, message->base.serial);
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
|
||||
@@ -256,10 +256,6 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
{
|
||||
window->x = message->configure_notify.x;
|
||||
window->y = message->configure_notify.y;
|
||||
window->width = message->configure_notify.width;
|
||||
window->height = message->configure_notify.height;
|
||||
_gdk_window_update_size (window);
|
||||
_gdk_broadway_window_resize_surface (window);
|
||||
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
event->configure.window = g_object_ref (window);
|
||||
|
||||
@@ -92,6 +92,8 @@ gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
|
||||
void _gdk_broadway_selection_window_destroyed (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_destroy (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial);
|
||||
|
||||
void _gdk_keymap_keys_changed (GdkDisplay *display);
|
||||
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
|
||||
|
||||
@@ -83,18 +83,16 @@ G_DEFINE_TYPE (GdkWindowImplBroadway,
|
||||
gdk_window_impl_broadway,
|
||||
GDK_TYPE_WINDOW_IMPL)
|
||||
|
||||
static guint dirty_flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
dirty_flush_idle (gpointer data)
|
||||
static void
|
||||
update_dirty_windows_and_sync (void)
|
||||
{
|
||||
GList *l;
|
||||
GdkBroadwayDisplay *display;
|
||||
|
||||
dirty_flush_id = 0;
|
||||
gboolean updated_surface;
|
||||
|
||||
display = GDK_BROADWAY_DISPLAY (gdk_display_get_default ());
|
||||
|
||||
updated_surface = FALSE;
|
||||
for (l = display->toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = l->data;
|
||||
@@ -102,6 +100,7 @@ dirty_flush_idle (gpointer data)
|
||||
if (impl->dirty)
|
||||
{
|
||||
impl->dirty = FALSE;
|
||||
updated_surface = TRUE;
|
||||
_gdk_broadway_server_window_update (display->server,
|
||||
impl->id,
|
||||
impl->surface);
|
||||
@@ -110,16 +109,32 @@ dirty_flush_idle (gpointer data)
|
||||
|
||||
/* We sync here to ensure all references to the impl->surface memory
|
||||
is done, as we may later paint new data in them. */
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
if (updated_surface)
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
else
|
||||
gdk_display_flush (GDK_DISPLAY (display));
|
||||
}
|
||||
|
||||
static guint flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
flush_idle (gpointer data)
|
||||
{
|
||||
flush_id = 0;
|
||||
|
||||
gdk_display_flush (gdk_display_get_default ());
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
|
||||
is frozen during e.g. window resizes so the paint will not happen
|
||||
and the window resize request is never flushed. */
|
||||
static void
|
||||
queue_dirty_flush (GdkBroadwayDisplay *display)
|
||||
queue_flush (GdkWindow *window)
|
||||
{
|
||||
if (dirty_flush_id == 0)
|
||||
dirty_flush_id = gdk_threads_add_idle (dirty_flush_idle, NULL);
|
||||
if (flush_id == 0)
|
||||
flush_id = gdk_threads_add_idle (flush_idle, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -197,6 +212,25 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
|
||||
_gdk_window_update_size (broadway_screen->root_window);
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkWindow *window)
|
||||
{
|
||||
update_dirty_windows_and_sync ();
|
||||
}
|
||||
|
||||
static void
|
||||
connect_frame_clock (GdkWindow *window)
|
||||
{
|
||||
if (WINDOW_IS_TOPLEVEL (window))
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
|
||||
|
||||
g_signal_connect (frame_clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), window);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
@@ -229,22 +263,21 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
g_assert (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT);
|
||||
|
||||
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
|
||||
|
||||
connect_frame_clock (window);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_resize_surface (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
cairo_surface_t *old;
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
old = impl->surface;
|
||||
cairo_surface_destroy (impl->surface);
|
||||
|
||||
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper),
|
||||
gdk_window_get_height (impl->wrapper));
|
||||
|
||||
cairo_surface_destroy (old);
|
||||
}
|
||||
|
||||
if (impl->ref_surface)
|
||||
@@ -384,7 +417,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
if (_gdk_broadway_server_window_show (broadway_display->server, impl->id))
|
||||
queue_dirty_flush (broadway_display);
|
||||
queue_flush (window);
|
||||
|
||||
}
|
||||
|
||||
@@ -404,8 +437,12 @@ gdk_window_broadway_hide (GdkWindow *window)
|
||||
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
|
||||
_gdk_broadway_window_grab_check_unmap (window,
|
||||
_gdk_broadway_server_get_next_serial (broadway_display->server));
|
||||
|
||||
if (_gdk_broadway_server_window_hide (broadway_display->server, impl->id))
|
||||
queue_dirty_flush (broadway_display);
|
||||
queue_flush (window);
|
||||
|
||||
_gdk_window_clear_update_area (window);
|
||||
}
|
||||
@@ -460,7 +497,7 @@ gdk_window_broadway_move_resize (GdkWindow *window,
|
||||
with_move,
|
||||
x, y,
|
||||
window->width, window->height);
|
||||
queue_dirty_flush (broadway_display);
|
||||
queue_flush (window);
|
||||
if (size_changed)
|
||||
window->resize_count++;
|
||||
}
|
||||
@@ -545,6 +582,12 @@ gdk_broadway_window_set_geometry_hints (GdkWindow *window,
|
||||
const GdkGeometry *geometry,
|
||||
GdkWindowHints geom_mask)
|
||||
{
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
impl->geometry_hints = *geometry;
|
||||
impl->geometry_hints_mask = geom_mask;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -610,7 +653,7 @@ gdk_window_broadway_set_device_cursor (GdkWindow *window,
|
||||
{
|
||||
_gdk_broadway_cursor_update_theme (cursor);
|
||||
g_hash_table_replace (impl->device_cursor,
|
||||
device, gdk_cursor_ref (cursor));
|
||||
device, g_object_ref (cursor));
|
||||
}
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -992,6 +1035,8 @@ struct _MoveResizeData
|
||||
gint moveresize_orig_width;
|
||||
gint moveresize_orig_height;
|
||||
long moveresize_process_time;
|
||||
GdkWindowHints moveresize_geom_mask;
|
||||
GdkGeometry moveresize_geometry;
|
||||
BroadwayInputMsg *moveresize_pending_event;
|
||||
};
|
||||
|
||||
@@ -999,20 +1044,19 @@ static MoveResizeData *
|
||||
get_move_resize_data (GdkDisplay *display,
|
||||
gboolean create)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
MoveResizeData *mv_resize;
|
||||
static GQuark move_resize_quark = 0;
|
||||
|
||||
if (!move_resize_quark)
|
||||
move_resize_quark = g_quark_from_static_string ("gdk-window-moveresize");
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
mv_resize = g_object_get_qdata (G_OBJECT (display), move_resize_quark);
|
||||
mv_resize = broadway_display->move_resize_data;
|
||||
|
||||
if (!mv_resize && create)
|
||||
{
|
||||
mv_resize = g_new0 (MoveResizeData, 1);
|
||||
mv_resize->display = display;
|
||||
|
||||
g_object_set_qdata (G_OBJECT (display), move_resize_quark, mv_resize);
|
||||
broadway_display->move_resize_data = mv_resize;
|
||||
}
|
||||
|
||||
return mv_resize;
|
||||
@@ -1081,6 +1125,13 @@ update_pos (MoveResizeData *mv_resize,
|
||||
w = MAX (w, 1);
|
||||
h = MAX (h, 1);
|
||||
|
||||
if (mv_resize->moveresize_geom_mask)
|
||||
{
|
||||
gdk_window_constrain_size (&mv_resize->moveresize_geometry,
|
||||
mv_resize->moveresize_geom_mask,
|
||||
w, h, &w, &h);
|
||||
}
|
||||
|
||||
gdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h);
|
||||
}
|
||||
else
|
||||
@@ -1135,7 +1186,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
|
||||
switch (event->base.type)
|
||||
{
|
||||
case 'm':
|
||||
case BROADWAY_EVENT_POINTER_MOVE:
|
||||
if (mv_resize->moveresize_window->resize_count > 0)
|
||||
{
|
||||
if (mv_resize->moveresize_pending_event)
|
||||
@@ -1163,7 +1214,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
finish_drag (mv_resize);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
case BROADWAY_EVENT_BUTTON_RELEASE:
|
||||
update_pos (mv_resize,
|
||||
event->pointer.root_x,
|
||||
event->pointer.root_y);
|
||||
@@ -1243,6 +1294,71 @@ create_moveresize_window (MoveResizeData *mv_resize,
|
||||
mv_resize->moveresize_process_time = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
gint width, height;
|
||||
|
||||
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
|
||||
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
|
||||
{
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect);
|
||||
gdk_window_get_geometry (mv_resize->moveresize_window,
|
||||
NULL, NULL, &width, &height);
|
||||
|
||||
switch (mv_resize->moveresize_geometry.win_gravity)
|
||||
{
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_CENTER:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
default:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
@@ -1253,6 +1369,9 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MoveResizeData *mv_resize;
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) ||
|
||||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
|
||||
@@ -1267,12 +1386,14 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
mv_resize->moveresize_y = root_y;
|
||||
mv_resize->moveresize_window = g_object_ref (window);
|
||||
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
mv_resize->moveresize_orig_width = gdk_window_get_width (window);
|
||||
mv_resize->moveresize_orig_height = gdk_window_get_height (window);
|
||||
|
||||
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
|
||||
mv_resize->moveresize_geometry = impl->geometry_hints;
|
||||
|
||||
calculate_unmoving_origin (mv_resize);
|
||||
|
||||
create_moveresize_window (mv_resize, timestamp);
|
||||
}
|
||||
|
||||
@@ -1328,7 +1449,6 @@ gdk_broadway_window_process_updates_recurse (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
impl->dirty = TRUE;
|
||||
queue_dirty_flush (GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1394,7 +1514,7 @@ _gdk_broadway_window_translate (GdkWindow *window,
|
||||
if (_gdk_broadway_server_window_translate (broadway_display->server,
|
||||
impl->id,
|
||||
area, dx, dy))
|
||||
queue_dirty_flush (broadway_display);
|
||||
queue_flush (window);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ struct _GdkWindowImplBroadway
|
||||
gint8 toplevel_window_type;
|
||||
gboolean dirty;
|
||||
gboolean last_synced;
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_hints_mask;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplBroadwayClass
|
||||
|
||||
@@ -42,3 +42,15 @@ isinf (double x)
|
||||
return (!_finite (x) && !_isnan (x));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Workaround for round() for non-GCC/non-C99 compilers */
|
||||
#ifndef HAVE_ROUND
|
||||
static inline double
|
||||
round (double x)
|
||||
{
|
||||
if (x >= 0)
|
||||
return floor (x + 0.5);
|
||||
else
|
||||
return ceil (x - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -610,6 +610,7 @@ gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_hide_titlebar_when_maximized
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_set_utf8_property
|
||||
gdk_x11_window_set_frame_sync_enabled
|
||||
gdk_x11_xatom_to_atom
|
||||
gdk_x11_xatom_to_atom_for_display
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -213,7 +213,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
|
||||
format = CAIRO_FORMAT_ARGB32;
|
||||
|
||||
cairo_stride = cairo_format_stride_for_width (format, width);
|
||||
cairo_pixels = g_malloc (height * cairo_stride);
|
||||
cairo_pixels = g_malloc_n (height, cairo_stride);
|
||||
surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
|
||||
format,
|
||||
width, height, cairo_stride);
|
||||
@@ -250,7 +250,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
|
||||
guchar *end = p + 4 * width;
|
||||
guint t1,t2,t3;
|
||||
|
||||
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
|
||||
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x80; d = ((t >> 8) + t) >> 8; } G_STMT_END
|
||||
|
||||
while (p < end)
|
||||
{
|
||||
|
||||
@@ -330,7 +330,7 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
* for this application. In X11, window managers may change this depending on the interaction
|
||||
* pattern under the presence of several pointers.
|
||||
*
|
||||
* You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent
|
||||
* You should use this function seldomly, only in code that isn't triggered by a #GdkEvent
|
||||
* and there aren't other means to get a meaningful #GdkDevice to operate on.
|
||||
*
|
||||
* Returns: (transfer none): The client pointer. This memory is
|
||||
|
||||
@@ -371,6 +371,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "before-paint");
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_UPDATE:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@@ -381,6 +382,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "update");
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@@ -400,6 +402,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "layout");
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_PAINT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@@ -419,6 +422,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "paint");
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_AFTER_PAINT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@@ -433,6 +437,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
timings->frame_end_time = g_get_monotonic_time ();
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
|
||||
;
|
||||
}
|
||||
|
||||
+15
-2
@@ -42,6 +42,9 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* for the use of round() */
|
||||
#include "fallback-c89.c"
|
||||
|
||||
#undef DEBUG_WINDOW_PRINTING
|
||||
|
||||
|
||||
@@ -937,19 +940,26 @@ static void
|
||||
apply_clip_as_shape (GdkWindow *window)
|
||||
{
|
||||
GdkRectangle r;
|
||||
cairo_region_t *region;
|
||||
|
||||
r.x = r.y = 0;
|
||||
r.width = window->width;
|
||||
r.height = window->height;
|
||||
|
||||
region = cairo_region_copy (window->clip_region);
|
||||
if (window->layered_region)
|
||||
cairo_region_subtract (region, window->layered_region);
|
||||
|
||||
/* We only apply the clip region if would differ
|
||||
from the actual clip region implied by the size
|
||||
of the window. This is to avoid unneccessarily
|
||||
adding meaningless shapes to all native subwindows */
|
||||
if (!region_rect_equal (window->clip_region, &r))
|
||||
apply_shape (window, window->clip_region);
|
||||
if (!region_rect_equal (region, &r))
|
||||
apply_shape (window, region);
|
||||
else
|
||||
apply_shape (window, NULL);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -9996,6 +10006,9 @@ gdk_window_print (GdkWindow *window,
|
||||
g_print (" alpha[%d]",
|
||||
window->alpha);
|
||||
|
||||
if (window->has_alpha_background)
|
||||
g_print (" alpha_bg");
|
||||
|
||||
s = print_region (window->clip_region);
|
||||
g_print (" clipbox[%s]", s);
|
||||
|
||||
|
||||
+544
-19
@@ -1,6 +1,7 @@
|
||||
/* GdkQuartzView.m
|
||||
*
|
||||
* Copyright (C) 2005-2007 Imendio AB
|
||||
* Copyright (C) 2011 Hiroyuki Yamamoto
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -23,18 +24,541 @@
|
||||
|
||||
@implementation GdkQuartzView
|
||||
|
||||
-(id)initWithFrame: (NSRect)frameRect
|
||||
{
|
||||
if ((self = [super initWithFrame: frameRect]))
|
||||
{
|
||||
markedRange = NSMakeRange (NSNotFound, 0);
|
||||
selectedRange = NSMakeRange (NSNotFound, 0);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(BOOL)acceptsFirstResponder
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("acceptsFirstResponder\n"));
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(BOOL)becomeFirstResponder
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("becomeFirstResponder\n"));
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(BOOL)resignFirstResponder
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("resignFirstResponder\n"));
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void) keyDown: (NSEvent *) theEvent
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("keyDown\n"));
|
||||
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
|
||||
}
|
||||
|
||||
-(void)flagsChanged: (NSEvent *) theEvent
|
||||
{
|
||||
}
|
||||
|
||||
-(NSUInteger)characterIndexForPoint: (NSPoint)aPoint
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("characterIndexForPoint\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(NSRect)firstRectForCharacterRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("firstRectForCharacterRange\n"));
|
||||
gint ns_x, ns_y;
|
||||
GdkRectangle *rect;
|
||||
|
||||
rect = g_object_get_data (G_OBJECT (gdk_window), GIC_CURSOR_RECT);
|
||||
if (rect)
|
||||
{
|
||||
_gdk_quartz_window_gdk_xy_to_xy (rect->x, rect->y + rect->height,
|
||||
&ns_x, &ns_y);
|
||||
|
||||
return NSMakeRect (ns_x, ns_y, rect->width, rect->height);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSMakeRect (0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
-(NSArray *)validAttributesForMarkedText
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("validAttributesForMarkedText\n"));
|
||||
return [NSArray arrayWithObjects: NSUnderlineStyleAttributeName, nil];
|
||||
}
|
||||
|
||||
-(NSAttributedString *)attributedSubstringForProposedRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("attributedSubstringForProposedRange\n"));
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(BOOL)hasMarkedText
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("hasMarkedText\n"));
|
||||
return markedRange.location != NSNotFound && markedRange.length != 0;
|
||||
}
|
||||
|
||||
-(NSRange)markedRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("markedRange\n"));
|
||||
return markedRange;
|
||||
}
|
||||
|
||||
-(NSRange)selectedRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("selectedRange\n"));
|
||||
return selectedRange;
|
||||
}
|
||||
|
||||
-(void)unmarkText
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("unmarkText\n"));
|
||||
gchar *prev_str;
|
||||
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
|
||||
|
||||
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
|
||||
if (prev_str)
|
||||
g_free (prev_str);
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL);
|
||||
}
|
||||
|
||||
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("setMarkedText\n"));
|
||||
const char *str;
|
||||
gchar *prev_str;
|
||||
|
||||
if (replacementRange.location == NSNotFound)
|
||||
{
|
||||
markedRange = NSMakeRange (newSelection.location, [aString length]);
|
||||
selectedRange = NSMakeRange (newSelection.location, newSelection.length);
|
||||
}
|
||||
else {
|
||||
markedRange = NSMakeRange (replacementRange.location, [aString length]);
|
||||
selectedRange = NSMakeRange (replacementRange.location + newSelection.location, newSelection.length);
|
||||
}
|
||||
|
||||
if ([aString isKindOfClass: [NSAttributedString class]])
|
||||
{
|
||||
str = [[aString string] UTF8String];
|
||||
}
|
||||
else {
|
||||
str = [aString UTF8String];
|
||||
}
|
||||
|
||||
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
|
||||
if (prev_str)
|
||||
g_free (prev_str);
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, g_strdup (str));
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_POS,
|
||||
GUINT_TO_POINTER (selectedRange.location));
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_LEN,
|
||||
GUINT_TO_POINTER (selectedRange.length));
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("setMarkedText: set %s (%p, nsview %p): %s\n",
|
||||
TIC_MARKED_TEXT, gdk_window, self,
|
||||
str ? str : "(empty)"));
|
||||
|
||||
/* handle text input changes by mouse events */
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
|
||||
TIC_IN_KEY_DOWN)))
|
||||
{
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_window);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)doCommandBySelector: (SEL)aSelector
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("doCommandBySelector\n"));
|
||||
if ([self respondsToSelector: aSelector])
|
||||
[self performSelector: aSelector];
|
||||
}
|
||||
|
||||
-(void)insertText: (id)aString replacementRange: (NSRange)replacementRange
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("insertText\n"));
|
||||
const char *str;
|
||||
NSString *string;
|
||||
gchar *prev_str;
|
||||
|
||||
if ([self hasMarkedText])
|
||||
[self unmarkText];
|
||||
|
||||
if ([aString isKindOfClass: [NSAttributedString class]])
|
||||
string = [aString string];
|
||||
else
|
||||
string = aString;
|
||||
|
||||
NSCharacterSet *ctrlChars = [NSCharacterSet controlCharacterSet];
|
||||
NSCharacterSet *wsnlChars = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
||||
if ([string rangeOfCharacterFromSet:ctrlChars].length &&
|
||||
[string rangeOfCharacterFromSet:wsnlChars].length == 0)
|
||||
{
|
||||
/* discard invalid text input with Chinese input methods */
|
||||
str = "";
|
||||
[self unmarkText];
|
||||
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
|
||||
[currentInputManager markedTextAbandoned:self];
|
||||
}
|
||||
else
|
||||
{
|
||||
str = [string UTF8String];
|
||||
}
|
||||
|
||||
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_INSERT_TEXT);
|
||||
if (prev_str)
|
||||
g_free (prev_str);
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_INSERT_TEXT, g_strdup (str));
|
||||
GDK_NOTE (EVENTS, g_print ("insertText: set %s (%p, nsview %p): %s\n",
|
||||
TIC_INSERT_TEXT, gdk_window, self,
|
||||
str ? str : "(empty)"));
|
||||
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
|
||||
|
||||
/* handle text input changes by mouse events */
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
|
||||
TIC_IN_KEY_DOWN)))
|
||||
{
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_window);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)deleteBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteBackward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteForward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteToBeginningOfLine\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteToEndOfLine\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteWordBackward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("deleteWordForward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertBacktab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("insertBacktab\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertNewline: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("insertNewline\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertTab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("insertTab\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveBackward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveBackwardAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveDown\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveDownAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveForward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveForwardAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveLeft\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveLeftAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveRight\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveRightAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocument\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocumentAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLine\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLineAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocument\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocumentAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToEndOfLine\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveToEndOfLineAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveUp\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveUpAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordBackward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordBackwardAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordForward\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordForwardAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordLeft\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordLeftAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordRight\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("moveWordRightAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("pageDown\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("pageDownAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("pageUp\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("pageUpAndModifySelection\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectAll: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("selectAll\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("selectLine\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectWord: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("selectWord\n"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)noop: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("noop\n"));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (trackingRect)
|
||||
{
|
||||
[self removeTrackingRect:trackingRect];
|
||||
[self removeTrackingRect: trackingRect];
|
||||
trackingRect = 0;
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(void)setGdkWindow:(GdkWindow *)window
|
||||
-(void)setGdkWindow: (GdkWindow *)window
|
||||
{
|
||||
gdk_window = window;
|
||||
}
|
||||
@@ -60,10 +584,11 @@
|
||||
return YES;
|
||||
|
||||
/* A view is opaque if its GdkWindow doesn't have the RGBA visual */
|
||||
return gdk_window_get_visual (gdk_window) != gdk_screen_get_rgba_visual (_gdk_screen);
|
||||
return gdk_window_get_visual (gdk_window) !=
|
||||
gdk_screen_get_rgba_visual (_gdk_screen);
|
||||
}
|
||||
|
||||
-(void)drawRect:(NSRect)rect
|
||||
-(void)drawRect: (NSRect)rect
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
|
||||
@@ -75,7 +600,7 @@
|
||||
if (GDK_WINDOW_DESTROYED (gdk_window))
|
||||
return;
|
||||
|
||||
if (!(gdk_window->event_mask & GDK_EXPOSURE_MASK))
|
||||
if (! (gdk_window->event_mask & GDK_EXPOSURE_MASK))
|
||||
return;
|
||||
|
||||
if (NSEqualRects (rect, NSZeroRect))
|
||||
@@ -93,7 +618,7 @@
|
||||
[NSGraphicsContext saveGraphicsState];
|
||||
|
||||
[[NSColor windowBackgroundColor] setFill];
|
||||
[NSBezierPath fillRect:rect];
|
||||
[NSBezierPath fillRect: rect];
|
||||
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
|
||||
@@ -107,9 +632,9 @@
|
||||
impl->needs_display_region = NULL;
|
||||
}
|
||||
|
||||
[self getRectsBeingDrawn:&drawn_rects count:&count];
|
||||
[self getRectsBeingDrawn: &drawn_rects count: &count];
|
||||
region = cairo_region_create ();
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
gdk_rect.x = drawn_rects[i].origin.x;
|
||||
@@ -133,7 +658,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setNeedsInvalidateShadow:(BOOL)invalidate
|
||||
-(void)setNeedsInvalidateShadow: (BOOL)invalidate
|
||||
{
|
||||
needsInvalidateShadow = invalidate;
|
||||
}
|
||||
@@ -151,7 +676,7 @@
|
||||
|
||||
if (trackingRect)
|
||||
{
|
||||
[self removeTrackingRect:trackingRect];
|
||||
[self removeTrackingRect: trackingRect];
|
||||
trackingRect = 0;
|
||||
}
|
||||
|
||||
@@ -163,32 +688,32 @@
|
||||
*/
|
||||
|
||||
rect = [self bounds];
|
||||
trackingRect = [self addTrackingRect:rect
|
||||
owner:self
|
||||
userData:nil
|
||||
assumeInside:NO];
|
||||
trackingRect = [self addTrackingRect: rect
|
||||
owner: self
|
||||
userData: nil
|
||||
assumeInside: NO];
|
||||
}
|
||||
|
||||
-(void)viewDidMoveToWindow
|
||||
{
|
||||
if (![self window]) /* We are destroyed already */
|
||||
return;
|
||||
return;
|
||||
|
||||
[self updateTrackingRect];
|
||||
}
|
||||
|
||||
-(void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
-(void)viewWillMoveToWindow: (NSWindow *)newWindow
|
||||
{
|
||||
if (newWindow == nil && trackingRect)
|
||||
{
|
||||
[self removeTrackingRect:trackingRect];
|
||||
[self removeTrackingRect: trackingRect];
|
||||
trackingRect = 0;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setFrame:(NSRect)frame
|
||||
-(void)setFrame: (NSRect)frame
|
||||
{
|
||||
[super setFrame:frame];
|
||||
[super setFrame: frame];
|
||||
|
||||
if ([self window])
|
||||
[self updateTrackingRect];
|
||||
|
||||
@@ -17,17 +17,33 @@
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#include "gdkwindow.h"
|
||||
#include "gdk/gdk.h"
|
||||
|
||||
@interface GdkQuartzView : NSView {
|
||||
/* Text Input Client */
|
||||
#define TIC_MARKED_TEXT "tic-marked-text"
|
||||
#define TIC_SELECTED_POS "tic-selected-pos"
|
||||
#define TIC_SELECTED_LEN "tic-selected-len"
|
||||
#define TIC_INSERT_TEXT "tic-insert-text"
|
||||
#define TIC_IN_KEY_DOWN "tic-in-key-down"
|
||||
|
||||
/* GtkIMContext */
|
||||
#define GIC_CURSOR_RECT "gic-cursor-rect"
|
||||
#define GIC_FILTER_KEY "gic-filter-key"
|
||||
#define GIC_FILTER_PASSTHRU 0
|
||||
#define GIC_FILTER_FILTERED 1
|
||||
|
||||
@interface GdkQuartzView : NSView <NSTextInputClient>
|
||||
{
|
||||
GdkWindow *gdk_window;
|
||||
NSTrackingRectTag trackingRect;
|
||||
BOOL needsInvalidateShadow;
|
||||
NSRange markedRange;
|
||||
NSRange selectedRange;
|
||||
}
|
||||
|
||||
-(void)setGdkWindow:(GdkWindow *)window;
|
||||
-(GdkWindow *)gdkWindow;
|
||||
-(NSTrackingRectTag)trackingRect;
|
||||
-(void)setNeedsInvalidateShadow:(BOOL)invalidate;
|
||||
- (void)setGdkWindow: (GdkWindow *)window;
|
||||
- (GdkWindow *)gdkWindow;
|
||||
- (NSTrackingRectTag)trackingRect;
|
||||
- (void)setNeedsInvalidateShadow: (BOOL)invalidate;
|
||||
|
||||
@end
|
||||
|
||||
@@ -618,7 +618,32 @@ gdk_event_prepare (GSource *source,
|
||||
gboolean retval;
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
|
||||
/* The prepare stage is the stage before the main loop starts polling
|
||||
* and dispatching events. The autorelease poll is drained here for
|
||||
* the preceding main loop iteration or, in case of the first iteration,
|
||||
* for the operations carried out between event loop initialization and
|
||||
* this first iteration.
|
||||
*
|
||||
* The autorelease poll must only be drained when the following conditions
|
||||
* apply:
|
||||
* - We are at the base CFRunLoop level (indicated by current_loop_level),
|
||||
* - We are at the base g_main_loop level (indicated by
|
||||
* g_main_depth())
|
||||
* - We are at the base poll_func level (indicated by getting events).
|
||||
*
|
||||
* Messing with the autorelease pool at any level of nesting can cause access
|
||||
* to deallocated memory because autorelease_pool is static and releasing a
|
||||
* pool will cause all pools allocated inside of it to be released as well.
|
||||
*/
|
||||
if (current_loop_level == 0 && g_main_depth() == 0 && getting_events == 0)
|
||||
{
|
||||
if (autorelease_pool)
|
||||
[autorelease_pool drain];
|
||||
|
||||
autorelease_pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
*timeout = -1;
|
||||
|
||||
if (_gdk_display->event_pause_count > 0)
|
||||
@@ -659,21 +684,6 @@ gdk_event_dispatch (GSource *source,
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
/* Refresh the autorelease pool if we're at the base CFRunLoop level
|
||||
* (indicated by current_loop_level) and the base g_main_loop level
|
||||
* (indicated by g_main_depth()). Messing with the autorelease pool at
|
||||
* any level of nesting can cause access to deallocated memory because
|
||||
* autorelease_pool is static and releasing a pool will cause all pools
|
||||
* allocated inside of it to be released as well.
|
||||
*/
|
||||
if (current_loop_level == 0 && g_main_depth() == 0)
|
||||
{
|
||||
if (autorelease_pool)
|
||||
[autorelease_pool drain];
|
||||
|
||||
autorelease_pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
_gdk_quartz_display_queue_events (_gdk_display);
|
||||
|
||||
event = _gdk_event_unqueue (_gdk_display);
|
||||
|
||||
@@ -1156,6 +1156,24 @@ synthesize_crossing_event (GdkWindow *window,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_synthesize_null_key_event (GdkWindow *window)
|
||||
{
|
||||
GdkEvent *event;
|
||||
GdkQuartzDeviceManagerCore *device_manager;
|
||||
|
||||
event = gdk_event_new (GDK_KEY_PRESS);
|
||||
event->any.type = GDK_KEY_PRESS;
|
||||
event->key.window = window;
|
||||
event->key.state = 0;
|
||||
event->key.hardware_keycode = 0;
|
||||
event->key.group = 0;
|
||||
event->key.keyval = GDK_KEY_VoidSymbol;
|
||||
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
|
||||
gdk_event_set_device (event, device_manager->core_keyboard);
|
||||
append_event(event, FALSE);
|
||||
}
|
||||
|
||||
GdkModifierType
|
||||
_gdk_quartz_events_get_current_keyboard_modifiers (void)
|
||||
{
|
||||
@@ -1494,8 +1512,11 @@ gdk_event_translate (GdkEvent *event,
|
||||
}
|
||||
break;
|
||||
|
||||
case NSMouseEntered:
|
||||
case NSMouseExited:
|
||||
if (WINDOW_IS_TOPLEVEL (window))
|
||||
[[NSCursor arrowCursor] set];
|
||||
/* fall through */
|
||||
case NSMouseEntered:
|
||||
return_val = synthesize_crossing_event (window, event, nsevent, x, y, x_root, y_root);
|
||||
break;
|
||||
|
||||
|
||||
+240
-235
@@ -82,17 +82,6 @@ _gdk_quartz_display_get_keymap (GdkDisplay *display)
|
||||
return default_keymap;
|
||||
}
|
||||
|
||||
/* Note: we could check only if building against the 10.5 SDK instead, but
|
||||
* that would make non-xml layouts not work in 32-bit which would be a quite
|
||||
* bad regression. This way, old unsupported layouts will just not work in
|
||||
* 64-bit.
|
||||
*/
|
||||
#ifdef __LP64__
|
||||
static TISInputSourceRef current_layout = NULL;
|
||||
#else
|
||||
static KeyboardLayoutRef current_layout = NULL;
|
||||
#endif
|
||||
|
||||
/* This is a table of all keyvals. Each keycode gets KEYVALS_PER_KEYCODE entries.
|
||||
* TThere is 1 keyval per modifier (Nothing, Shift, Alt, Shift+Alt);
|
||||
*/
|
||||
@@ -267,10 +256,17 @@ const static struct {
|
||||
};
|
||||
|
||||
static void
|
||||
maybe_update_keymap (void)
|
||||
update_keymap (void)
|
||||
{
|
||||
const void *chr_data = NULL;
|
||||
guint *p;
|
||||
int i;
|
||||
|
||||
/* Note: we could check only if building against the 10.5 SDK instead, but
|
||||
* that would make non-xml layouts not work in 32-bit which would be a quite
|
||||
* bad regression. This way, old unsupported layouts will just not work in
|
||||
* 64-bit.
|
||||
*/
|
||||
#ifdef __LP64__
|
||||
TISInputSourceRef new_layout = TISCopyCurrentKeyboardLayoutInputSource ();
|
||||
CFDataRef layout_data_ref;
|
||||
@@ -282,228 +278,221 @@ maybe_update_keymap (void)
|
||||
KLGetCurrentKeyboardLayout (&new_layout);
|
||||
#endif
|
||||
|
||||
if (new_layout != current_layout)
|
||||
{
|
||||
guint *p;
|
||||
int i;
|
||||
|
||||
g_free (keyval_array);
|
||||
keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
|
||||
g_free (keyval_array);
|
||||
keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
|
||||
|
||||
#ifdef __LP64__
|
||||
layout_data_ref = (CFDataRef) TISGetInputSourceProperty
|
||||
(new_layout, kTISPropertyUnicodeKeyLayoutData);
|
||||
layout_data_ref = (CFDataRef) TISGetInputSourceProperty
|
||||
(new_layout, kTISPropertyUnicodeKeyLayoutData);
|
||||
|
||||
if (layout_data_ref)
|
||||
chr_data = CFDataGetBytePtr (layout_data_ref);
|
||||
if (layout_data_ref)
|
||||
chr_data = CFDataGetBytePtr (layout_data_ref);
|
||||
|
||||
if (chr_data == NULL)
|
||||
{
|
||||
g_error ("cannot get keyboard layout data");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
/* Get the layout kind */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLKind, (const void **)&layout_kind);
|
||||
|
||||
/* 8-bit-only keyabord layout */
|
||||
if (layout_kind == kKLKCHRKind)
|
||||
{
|
||||
/* Get chr data */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLKCHRData, (const void **)&chr_data);
|
||||
|
||||
for (i = 0; i < NUM_KEYCODES; i++)
|
||||
{
|
||||
int j;
|
||||
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
|
||||
|
||||
p = keyval_array + i * KEYVALS_PER_KEYCODE;
|
||||
|
||||
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
|
||||
{
|
||||
UInt32 c, state = 0;
|
||||
UInt16 key_code;
|
||||
UniChar uc;
|
||||
|
||||
key_code = modifiers[j] | i;
|
||||
c = KeyTranslate (chr_data, key_code, &state);
|
||||
|
||||
if (state != 0)
|
||||
{
|
||||
UInt32 state2 = 0;
|
||||
c = KeyTranslate (chr_data, key_code | 128, &state2);
|
||||
}
|
||||
|
||||
if (c != 0 && c != 0x10)
|
||||
{
|
||||
int k;
|
||||
gboolean found = FALSE;
|
||||
|
||||
/* FIXME: some keyboard layouts (e.g. Russian) use
|
||||
* a different 8-bit character set. We should
|
||||
* check for this. Not a serious problem, because
|
||||
* most (all?) of these layouts also have a
|
||||
* uchr version.
|
||||
*/
|
||||
uc = macroman2ucs (c);
|
||||
|
||||
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
|
||||
{
|
||||
if (special_ucs_table[k].ucs_value == uc)
|
||||
{
|
||||
p[j] = special_ucs_table[k].keyval;
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Special-case shift-tab since GTK+ expects
|
||||
* GDK_KEY_ISO_Left_Tab for that.
|
||||
*/
|
||||
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
|
||||
p[j] = GDK_KEY_ISO_Left_Tab;
|
||||
|
||||
if (!found)
|
||||
p[j] = gdk_unicode_to_keyval (uc);
|
||||
}
|
||||
}
|
||||
|
||||
if (p[3] == p[2])
|
||||
p[3] = 0;
|
||||
if (p[2] == p[1])
|
||||
p[2] = 0;
|
||||
if (p[1] == p[0])
|
||||
p[1] = 0;
|
||||
if (p[0] == p[2] &&
|
||||
p[1] == p[3])
|
||||
p[2] = p[3] = 0;
|
||||
}
|
||||
}
|
||||
/* unicode keyboard layout */
|
||||
else if (layout_kind == kKLKCHRuchrKind || layout_kind == kKLuchrKind)
|
||||
{
|
||||
/* Get chr data */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLuchrData, (const void **)&chr_data);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUM_KEYCODES; i++)
|
||||
{
|
||||
int j;
|
||||
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
|
||||
UniChar chars[4];
|
||||
UniCharCount nChars;
|
||||
|
||||
p = keyval_array + i * KEYVALS_PER_KEYCODE;
|
||||
|
||||
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
|
||||
{
|
||||
UInt32 state = 0;
|
||||
OSStatus err;
|
||||
UInt16 key_code;
|
||||
UniChar uc;
|
||||
|
||||
key_code = modifiers[j] | i;
|
||||
err = UCKeyTranslate (chr_data, i, kUCKeyActionDisplay,
|
||||
(modifiers[j] >> 8) & 0xFF,
|
||||
LMGetKbdType(),
|
||||
0,
|
||||
&state, 4, &nChars, chars);
|
||||
|
||||
/* FIXME: Theoretically, we can get multiple UTF-16 values;
|
||||
* we should convert them to proper unicode and figure
|
||||
* out whether there are really keyboard layouts that
|
||||
* give us more than one character for one keypress. */
|
||||
if (err == noErr && nChars == 1)
|
||||
{
|
||||
int k;
|
||||
gboolean found = FALSE;
|
||||
|
||||
/* A few <Shift><Option>keys return two
|
||||
* characters, the first of which is U+00a0,
|
||||
* which isn't interesting; so we return the
|
||||
* second. More sophisticated handling is the
|
||||
* job of a GtkIMContext.
|
||||
*
|
||||
* If state isn't zero, it means that it's a
|
||||
* dead key of some sort. Some of those are
|
||||
* enumerated in the special_ucs_table with the
|
||||
* high nibble set to f to push it into the
|
||||
* private use range. Here we do the same.
|
||||
*/
|
||||
if (state != 0)
|
||||
chars[nChars - 1] |= 0xf000;
|
||||
uc = chars[nChars - 1];
|
||||
|
||||
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
|
||||
{
|
||||
if (special_ucs_table[k].ucs_value == uc)
|
||||
{
|
||||
p[j] = special_ucs_table[k].keyval;
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Special-case shift-tab since GTK+ expects
|
||||
* GDK_KEY_ISO_Left_Tab for that.
|
||||
*/
|
||||
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
|
||||
p[j] = GDK_KEY_ISO_Left_Tab;
|
||||
|
||||
if (!found)
|
||||
p[j] = gdk_unicode_to_keyval (uc);
|
||||
}
|
||||
}
|
||||
|
||||
if (p[3] == p[2])
|
||||
p[3] = 0;
|
||||
if (p[2] == p[1])
|
||||
p[2] = 0;
|
||||
if (p[1] == p[0])
|
||||
p[1] = 0;
|
||||
if (p[0] == p[2] &&
|
||||
p[1] == p[3])
|
||||
p[2] = p[3] = 0;
|
||||
}
|
||||
#ifndef __LP64__
|
||||
}
|
||||
else
|
||||
{
|
||||
g_error ("unknown type of keyboard layout (neither KCHR nor uchr)"
|
||||
" - not supported right now");
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
|
||||
{
|
||||
p = keyval_array + modifier_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
if (p[0] == 0 && p[1] == 0 &&
|
||||
p[2] == 0 && p[3] == 0)
|
||||
p[0] = modifier_keys[i].keyval;
|
||||
}
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (function_keys); i++)
|
||||
{
|
||||
p = keyval_array + function_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
p[0] = function_keys[i].keyval;
|
||||
p[1] = p[2] = p[3] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
|
||||
{
|
||||
p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
if (p[0] == known_numeric_keys[i].normal_keyval)
|
||||
p[0] = known_numeric_keys[i].keypad_keyval;
|
||||
}
|
||||
|
||||
if (current_layout)
|
||||
g_signal_emit_by_name (default_keymap, "keys_changed");
|
||||
|
||||
current_layout = new_layout;
|
||||
if (chr_data == NULL)
|
||||
{
|
||||
g_error ("cannot get keyboard layout data");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
||||
/* Get the layout kind */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLKind, (const void **)&layout_kind);
|
||||
|
||||
/* 8-bit-only keyabord layout */
|
||||
if (layout_kind == kKLKCHRKind)
|
||||
{
|
||||
/* Get chr data */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLKCHRData, (const void **)&chr_data);
|
||||
|
||||
for (i = 0; i < NUM_KEYCODES; i++)
|
||||
{
|
||||
int j;
|
||||
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
|
||||
|
||||
p = keyval_array + i * KEYVALS_PER_KEYCODE;
|
||||
|
||||
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
|
||||
{
|
||||
UInt32 c, state = 0;
|
||||
UInt16 key_code;
|
||||
UniChar uc;
|
||||
|
||||
key_code = modifiers[j] | i;
|
||||
c = KeyTranslate (chr_data, key_code, &state);
|
||||
|
||||
if (state != 0)
|
||||
{
|
||||
UInt32 state2 = 0;
|
||||
c = KeyTranslate (chr_data, key_code | 128, &state2);
|
||||
}
|
||||
|
||||
if (c != 0 && c != 0x10)
|
||||
{
|
||||
int k;
|
||||
gboolean found = FALSE;
|
||||
|
||||
/* FIXME: some keyboard layouts (e.g. Russian) use a
|
||||
* different 8-bit character set. We should check
|
||||
* for this. Not a serious problem, because most
|
||||
* (all?) of these layouts also have a uchr version.
|
||||
*/
|
||||
uc = macroman2ucs (c);
|
||||
|
||||
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
|
||||
{
|
||||
if (special_ucs_table[k].ucs_value == uc)
|
||||
{
|
||||
p[j] = special_ucs_table[k].keyval;
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Special-case shift-tab since GTK+ expects
|
||||
* GDK_KEY_ISO_Left_Tab for that.
|
||||
*/
|
||||
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
|
||||
p[j] = GDK_KEY_ISO_Left_Tab;
|
||||
|
||||
if (!found)
|
||||
p[j] = gdk_unicode_to_keyval (uc);
|
||||
}
|
||||
}
|
||||
|
||||
if (p[3] == p[2])
|
||||
p[3] = 0;
|
||||
if (p[2] == p[1])
|
||||
p[2] = 0;
|
||||
if (p[1] == p[0])
|
||||
p[1] = 0;
|
||||
if (p[0] == p[2] &&
|
||||
p[1] == p[3])
|
||||
p[2] = p[3] = 0;
|
||||
}
|
||||
}
|
||||
/* unicode keyboard layout */
|
||||
else if (layout_kind == kKLKCHRuchrKind || layout_kind == kKLuchrKind)
|
||||
{
|
||||
/* Get chr data */
|
||||
KLGetKeyboardLayoutProperty (new_layout, kKLuchrData, (const void **)&chr_data);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUM_KEYCODES; i++)
|
||||
{
|
||||
int j;
|
||||
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
|
||||
UniChar chars[4];
|
||||
UniCharCount nChars;
|
||||
|
||||
p = keyval_array + i * KEYVALS_PER_KEYCODE;
|
||||
|
||||
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
|
||||
{
|
||||
UInt32 state = 0;
|
||||
OSStatus err;
|
||||
UInt16 key_code;
|
||||
UniChar uc;
|
||||
|
||||
key_code = modifiers[j] | i;
|
||||
err = UCKeyTranslate (chr_data, i, kUCKeyActionDisplay,
|
||||
(modifiers[j] >> 8) & 0xFF,
|
||||
LMGetKbdType(),
|
||||
0,
|
||||
&state, 4, &nChars, chars);
|
||||
|
||||
/* FIXME: Theoretically, we can get multiple UTF-16
|
||||
* values; we should convert them to proper unicode and
|
||||
* figure out whether there are really keyboard layouts
|
||||
* that give us more than one character for one
|
||||
* keypress.
|
||||
*/
|
||||
if (err == noErr && nChars == 1)
|
||||
{
|
||||
int k;
|
||||
gboolean found = FALSE;
|
||||
|
||||
/* A few <Shift><Option>keys return two characters,
|
||||
* the first of which is U+00a0, which isn't
|
||||
* interesting; so we return the second. More
|
||||
* sophisticated handling is the job of a
|
||||
* GtkIMContext.
|
||||
*
|
||||
* If state isn't zero, it means that it's a dead
|
||||
* key of some sort. Some of those are enumerated in
|
||||
* the special_ucs_table with the high nibble set to
|
||||
* f to push it into the private use range. Here we
|
||||
* do the same.
|
||||
*/
|
||||
if (state != 0)
|
||||
chars[nChars - 1] |= 0xf000;
|
||||
uc = chars[nChars - 1];
|
||||
|
||||
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
|
||||
{
|
||||
if (special_ucs_table[k].ucs_value == uc)
|
||||
{
|
||||
p[j] = special_ucs_table[k].keyval;
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Special-case shift-tab since GTK+ expects
|
||||
* GDK_KEY_ISO_Left_Tab for that.
|
||||
*/
|
||||
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
|
||||
p[j] = GDK_KEY_ISO_Left_Tab;
|
||||
|
||||
if (!found)
|
||||
p[j] = gdk_unicode_to_keyval (uc);
|
||||
}
|
||||
}
|
||||
|
||||
if (p[3] == p[2])
|
||||
p[3] = 0;
|
||||
if (p[2] == p[1])
|
||||
p[2] = 0;
|
||||
if (p[1] == p[0])
|
||||
p[1] = 0;
|
||||
if (p[0] == p[2] &&
|
||||
p[1] == p[3])
|
||||
p[2] = p[3] = 0;
|
||||
}
|
||||
#ifndef __LP64__
|
||||
}
|
||||
else
|
||||
{
|
||||
g_error ("unknown type of keyboard layout (neither KCHR nor uchr)"
|
||||
" - not supported right now");
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
|
||||
{
|
||||
p = keyval_array + modifier_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
if (p[0] == 0 && p[1] == 0 &&
|
||||
p[2] == 0 && p[3] == 0)
|
||||
p[0] = modifier_keys[i].keyval;
|
||||
}
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (function_keys); i++)
|
||||
{
|
||||
p = keyval_array + function_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
p[0] = function_keys[i].keyval;
|
||||
p[1] = p[2] = p[3] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
|
||||
{
|
||||
p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
|
||||
|
||||
if (p[0] == known_numeric_keys[i].normal_keyval)
|
||||
p[0] = known_numeric_keys[i].keypad_keyval;
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (default_keymap, "keys-changed");
|
||||
}
|
||||
|
||||
static PangoDirection
|
||||
@@ -542,8 +531,6 @@ gdk_quartz_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
GArray *keys_array;
|
||||
int i;
|
||||
|
||||
maybe_update_keymap ();
|
||||
|
||||
*n_keys = 0;
|
||||
keys_array = g_array_new (FALSE, FALSE, sizeof (GdkKeymapKey));
|
||||
|
||||
@@ -579,8 +566,6 @@ gdk_quartz_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
int i;
|
||||
guint *p;
|
||||
|
||||
maybe_update_keymap ();
|
||||
|
||||
*n_entries = 0;
|
||||
|
||||
if (hardware_keycode > NUM_KEYCODES)
|
||||
@@ -689,8 +674,6 @@ gdk_quartz_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
GdkModifierType bit;
|
||||
guint tmp_modifiers = 0;
|
||||
|
||||
maybe_update_keymap ();
|
||||
|
||||
if (keyval)
|
||||
*keyval = 0;
|
||||
if (effective_group)
|
||||
@@ -835,14 +818,36 @@ _gdk_quartz_keys_is_modifier (guint keycode)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
input_sources_changed_notification (CFNotificationCenterRef center,
|
||||
void *observer,
|
||||
CFStringRef name,
|
||||
const void *object,
|
||||
CFDictionaryRef userInfo)
|
||||
{
|
||||
update_keymap ();
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_keymap_init (GdkQuartzKeymap *keymap)
|
||||
{
|
||||
update_keymap ();
|
||||
CFNotificationCenterAddObserver (CFNotificationCenterGetDistributedCenter (),
|
||||
keymap,
|
||||
input_sources_changed_notification,
|
||||
CFSTR ("AppleSelectedInputSourcesChangedNotification"),
|
||||
NULL,
|
||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_keymap_finalize (GObject *object)
|
||||
{
|
||||
CFNotificationCenterRemoveObserver (CFNotificationCenterGetDistributedCenter (),
|
||||
object,
|
||||
CFSTR ("AppleSelectedInputSourcesChangedNotification"),
|
||||
NULL);
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_keymap_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ void _gdk_quartz_event_loop_release_event (NSEvent *event);
|
||||
/* Keys */
|
||||
GdkEventType _gdk_quartz_keys_event_type (NSEvent *event);
|
||||
gboolean _gdk_quartz_keys_is_modifier (guint keycode);
|
||||
void _gdk_quartz_synthesize_null_key_event (GdkWindow *window);
|
||||
|
||||
/* Drag and Drop */
|
||||
void _gdk_quartz_window_register_dnd (GdkWindow *window);
|
||||
|
||||
@@ -55,6 +55,10 @@ typedef enum
|
||||
|
||||
GdkOSXVersion gdk_quartz_osx_version (void);
|
||||
|
||||
GdkAtom gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type);
|
||||
NSString *gdk_quartz_target_to_pasteboard_type_libgtk_only (const gchar *target);
|
||||
NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#define __GDKQUARTZ_H_INSIDE__
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "gdkselection.h"
|
||||
#include "gdkproperty.h"
|
||||
#include "gdkquartz.h"
|
||||
|
||||
gboolean
|
||||
_gdk_quartz_display_set_selection_owner (GdkDisplay *display,
|
||||
@@ -171,3 +172,42 @@ _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
|
||||
{
|
||||
if ([type isEqualToString:NSStringPboardType])
|
||||
return gdk_atom_intern_static_string ("UTF8_STRING");
|
||||
else if ([type isEqualToString:NSTIFFPboardType])
|
||||
return gdk_atom_intern_static_string ("image/tiff");
|
||||
else if ([type isEqualToString:NSColorPboardType])
|
||||
return gdk_atom_intern_static_string ("application/x-color");
|
||||
else if ([type isEqualToString:NSURLPboardType])
|
||||
return gdk_atom_intern_static_string ("text/uri-list");
|
||||
else
|
||||
return gdk_atom_intern ([type UTF8String], FALSE);
|
||||
}
|
||||
|
||||
NSString *
|
||||
gdk_quartz_target_to_pasteboard_type_libgtk_only (const char *target)
|
||||
{
|
||||
if (strcmp (target, "UTF8_STRING") == 0)
|
||||
return NSStringPboardType;
|
||||
else if (strcmp (target, "image/tiff") == 0)
|
||||
return NSTIFFPboardType;
|
||||
else if (strcmp (target, "application/x-color") == 0)
|
||||
return NSColorPboardType;
|
||||
else if (strcmp (target, "text/uri-list") == 0)
|
||||
return NSURLPboardType;
|
||||
else
|
||||
return [NSString stringWithUTF8String:target];
|
||||
}
|
||||
|
||||
NSString *
|
||||
gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom)
|
||||
{
|
||||
gchar *target = gdk_atom_name (atom);
|
||||
NSString *ret = gdk_quartz_target_to_pasteboard_type_libgtk_only (target);
|
||||
g_free (target);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2338,14 +2338,18 @@ window_type_hint_to_level (GdkWindowTypeHint hint)
|
||||
return NSTornOffMenuWindowLevel;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_DOCK:
|
||||
return NSFloatingWindowLevel; /* NSDockWindowLevel is deprecated, and not replaced */
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
|
||||
return NSFloatingWindowLevel;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_NORMAL: /* Normal toplevel window */
|
||||
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLBAR: /* Window used to implement toolbars */
|
||||
case GDK_WINDOW_TYPE_HINT_DESKTOP: /* N/A */
|
||||
break;
|
||||
return NSNormalWindowLevel;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_DESKTOP:
|
||||
return kCGDesktopWindowLevelKey; /* doesn't map to any real Cocoa model */
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -324,13 +324,6 @@ gdk_wayland_window_attach_image (GdkWindow *window)
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
/* The "drawn to" Cairo surface is the same as the Cairo surface from which
|
||||
* we are driving the buffer for the Wayland surface. Therefore we don't
|
||||
* need to do anything here
|
||||
*/
|
||||
if (impl->server_surface == impl->cairo_surface)
|
||||
return;
|
||||
|
||||
/* The wayland surface is attached to a buffer that is from the old "drawn
|
||||
* to" surface. Unref the surface and restore the state.
|
||||
*/
|
||||
|
||||
@@ -150,6 +150,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
guchar *ucptr;
|
||||
wchar_t *wcptr, *p;
|
||||
glong wclen;
|
||||
GError *err = NULL;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
@@ -193,7 +194,13 @@ _gdk_win32_window_change_property (GdkWindow *window,
|
||||
return;
|
||||
}
|
||||
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, NULL);
|
||||
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, &err);
|
||||
if (err != NULL)
|
||||
{
|
||||
g_warning ("Failed to convert utf8: %s", err->message);
|
||||
g_clear_error (&err);
|
||||
return;
|
||||
}
|
||||
|
||||
wclen++; /* Terminating 0 */
|
||||
size = wclen * 2;
|
||||
@@ -399,7 +406,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
g_value_set_boolean (value, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* With 'MS Sans Serif' as windows menu font (default on win98se) you'll get a
|
||||
* bunch of :
|
||||
@@ -416,7 +422,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
/* Pango finally uses GetDeviceCaps to scale, we use simple
|
||||
* approximation here.
|
||||
*/
|
||||
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? -3*ncm.lfMenuFont.lfHeight/4 : 10);
|
||||
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
|
||||
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
|
||||
name, ncm.lfMenuFont.lfFaceName));
|
||||
@@ -424,7 +430,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
/* Avoid issues like those described in bug #135098 */
|
||||
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
|
||||
{
|
||||
char* s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
|
||||
char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
|
||||
g_value_set_string (value, s);
|
||||
|
||||
@@ -433,7 +439,6 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -859,6 +859,14 @@ _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device)
|
||||
{
|
||||
if (device->scroll_valuators->len > 0)
|
||||
g_array_remove_range (device->scroll_valuators, 0,
|
||||
device->scroll_valuators->len);
|
||||
}
|
||||
|
||||
gint
|
||||
_gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
|
||||
{
|
||||
|
||||
@@ -838,6 +838,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
*/
|
||||
if (toplevel->has_pointer &&
|
||||
mode != NotifyGrab &&
|
||||
#ifdef XINPUT_2
|
||||
mode != XINotifyPassiveGrab &&
|
||||
mode != XINotifyPassiveUngrab &&
|
||||
#endif /* XINPUT_2 */
|
||||
mode != NotifyUngrab)
|
||||
toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE;
|
||||
|
||||
@@ -845,6 +849,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
case NotifyNonlinear:
|
||||
case NotifyNonlinearVirtual:
|
||||
if (mode != NotifyGrab &&
|
||||
#ifdef XINPUT_2
|
||||
mode != XINotifyPassiveGrab &&
|
||||
mode != XINotifyPassiveUngrab &&
|
||||
#endif /* XINPUT_2 */
|
||||
mode != NotifyUngrab)
|
||||
toplevel->has_focus_window = (focus_in) ? TRUE : FALSE;
|
||||
/* We pretend that the focus moves to the grab
|
||||
@@ -860,6 +868,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
||||
* grab is in effect
|
||||
*/
|
||||
if (mode != NotifyGrab &&
|
||||
#ifdef XINPUT_2
|
||||
mode != XINotifyPassiveGrab &&
|
||||
mode != XINotifyPassiveUngrab &&
|
||||
#endif /* XINPUT_2 */
|
||||
mode != NotifyUngrab)
|
||||
toplevel->has_pointer_focus = (focus_in) ? TRUE : FALSE;
|
||||
break;
|
||||
|
||||
@@ -491,6 +491,8 @@ gdk_x11_device_manager_xi2_constructed (GObject *object)
|
||||
XIEventMask event_mask;
|
||||
unsigned char mask[2] = { 0 };
|
||||
|
||||
G_OBJECT_CLASS (gdk_x11_device_manager_xi2_parent_class)->constructed (object);
|
||||
|
||||
device_manager = GDK_X11_DEVICE_MANAGER_XI2 (object);
|
||||
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
|
||||
xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
@@ -763,6 +765,7 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
|
||||
if (device)
|
||||
{
|
||||
_gdk_device_reset_axes (device);
|
||||
_gdk_device_xi2_unset_scroll_valuators ((GdkX11DeviceXI2 *) device);
|
||||
translate_device_classes (display, device, ev->classes, ev->num_classes);
|
||||
|
||||
g_signal_emit_by_name (G_OBJECT (device), "changed");
|
||||
@@ -777,12 +780,16 @@ translate_crossing_mode (gint mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case NotifyNormal:
|
||||
case XINotifyNormal:
|
||||
return GDK_CROSSING_NORMAL;
|
||||
case NotifyGrab:
|
||||
case XINotifyGrab:
|
||||
case XINotifyPassiveGrab:
|
||||
return GDK_CROSSING_GRAB;
|
||||
case NotifyUngrab:
|
||||
case XINotifyUngrab:
|
||||
case XINotifyPassiveUngrab:
|
||||
return GDK_CROSSING_UNGRAB;
|
||||
case XINotifyWhileGrabbed:
|
||||
/* Fall through, unexpected in pointer crossing events */
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
@@ -1555,7 +1562,25 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
source_device = g_hash_table_lookup (device_manager->id_table,
|
||||
GUINT_TO_POINTER (xev->sourceid));
|
||||
gdk_event_set_source_device (event, source_device);
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
|
||||
|
||||
if (ev->evtype == XI_Enter &&
|
||||
xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
|
||||
gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL)
|
||||
{
|
||||
if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
|
||||
else
|
||||
{
|
||||
GList *slaves, *l;
|
||||
|
||||
slaves = gdk_device_list_slave_devices (source_device);
|
||||
|
||||
for (l = slaves; l; l = l->next)
|
||||
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data));
|
||||
|
||||
g_list_free (slaves);
|
||||
}
|
||||
}
|
||||
|
||||
event->crossing.mode = translate_crossing_mode (xev->mode);
|
||||
event->crossing.detail = translate_notify_type (xev->detail);
|
||||
|
||||
@@ -140,6 +140,7 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_STATE_ABOVE",
|
||||
"_NET_WM_STATE_BELOW",
|
||||
"_NET_WM_STATE_FULLSCREEN",
|
||||
"_NET_WM_STATE_HIDDEN",
|
||||
"_NET_WM_STATE_MODAL",
|
||||
"_NET_WM_STATE_MAXIMIZED_VERT",
|
||||
"_NET_WM_STATE_MAXIMIZED_HORZ",
|
||||
@@ -149,8 +150,17 @@ static const char *const precache_atoms[] = {
|
||||
"_NET_WM_SYNC_REQUEST",
|
||||
"_NET_WM_SYNC_REQUEST_COUNTER",
|
||||
"_NET_WM_WINDOW_TYPE",
|
||||
"_NET_WM_WINDOW_TYPE_COMBO",
|
||||
"_NET_WM_WINDOW_TYPE_DIALOG",
|
||||
"_NET_WM_WINDOW_TYPE_DND",
|
||||
"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_NORMAL",
|
||||
"_NET_WM_WINDOW_TYPE_POPUP_MENU",
|
||||
"_NET_WM_WINDOW_TYPE_TOOLTIP",
|
||||
"_NET_WM_WINDOW_TYPE_UTILITY",
|
||||
"_NET_WM_USER_TIME",
|
||||
"_NET_WM_USER_TIME_WINDOW",
|
||||
"_NET_VIRTUAL_ROOTS",
|
||||
"GDK_SELECTION",
|
||||
"_NET_WM_STATE_FOCUSED"
|
||||
@@ -1731,7 +1741,8 @@ device_grab_update_callback (GdkDisplay *display,
|
||||
|
||||
pointer_info = _gdk_display_get_pointer_info (display, device);
|
||||
_gdk_display_device_grab_update (display, device,
|
||||
pointer_info->last_slave, serial);
|
||||
pointer_info->last_slave ? pointer_info->last_slave : device,
|
||||
serial);
|
||||
}
|
||||
|
||||
#define XSERVER_TIME_IS_LATER(time1, time2) \
|
||||
|
||||
@@ -230,6 +230,8 @@ guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
|
||||
XIButtonState *buttons_state,
|
||||
XIGroupState *group_state);
|
||||
gint _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device);
|
||||
void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device);
|
||||
|
||||
|
||||
GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2,
|
||||
gint device_id);
|
||||
|
||||
+43
-13
@@ -96,13 +96,13 @@ gdk_x11_screen_get_display (GdkScreen *screen)
|
||||
static gint
|
||||
gdk_x11_screen_get_width (GdkScreen *screen)
|
||||
{
|
||||
return WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
|
||||
return GDK_X11_SCREEN (screen)->width;
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_x11_screen_get_height (GdkScreen *screen)
|
||||
{
|
||||
return HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
|
||||
return GDK_X11_SCREEN (screen)->height;
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -149,6 +149,9 @@ gdk_x11_screen_dispose (GObject *object)
|
||||
if (x11_screen->root_window)
|
||||
_gdk_window_destroy (x11_screen->root_window, TRUE);
|
||||
|
||||
for (i = 0; i < x11_screen->nvisuals; i++)
|
||||
g_object_run_dispose (G_OBJECT (x11_screen->visuals[i]));
|
||||
|
||||
G_OBJECT_CLASS (gdk_x11_screen_parent_class)->dispose (object);
|
||||
|
||||
x11_screen->xdisplay = NULL;
|
||||
@@ -892,8 +895,8 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
|
||||
gint *right)
|
||||
{
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
gint top_most_pos = HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
|
||||
gint left_most_pos = WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
|
||||
gint top_most_pos = x11_screen->height;
|
||||
gint left_most_pos = x11_screen->width;
|
||||
gint bottom_most_pos = 0;
|
||||
gint right_most_pos = 0;
|
||||
gint monitor_num;
|
||||
@@ -1022,6 +1025,30 @@ init_multihead (GdkScreen *screen)
|
||||
HeightOfScreen (x11_screen->xscreen));
|
||||
}
|
||||
|
||||
static void
|
||||
update_bounding_box (GdkScreen *screen)
|
||||
{
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
gint i, x1, y1, x2, y2;
|
||||
|
||||
x1 = y1 = G_MAXINT;
|
||||
x2 = y2 = G_MININT;
|
||||
|
||||
for (i = 0; i < x11_screen->n_monitors; i++)
|
||||
{
|
||||
GdkX11Monitor *monitor;
|
||||
|
||||
monitor = &x11_screen->monitors[i];
|
||||
x1 = MIN (x1, monitor->geometry.x);
|
||||
y1 = MIN (y1, monitor->geometry.y);
|
||||
x2 = MAX (x2, monitor->geometry.x + monitor->geometry.width);
|
||||
y2 = MAX (y2, monitor->geometry.y + monitor->geometry.height);
|
||||
}
|
||||
|
||||
x11_screen->width = x2 - x1;
|
||||
x11_screen->height = y2 - y1;
|
||||
}
|
||||
|
||||
GdkScreen *
|
||||
_gdk_x11_screen_new (GdkDisplay *display,
|
||||
gint screen_number)
|
||||
@@ -1047,7 +1074,8 @@ _gdk_x11_screen_new (GdkDisplay *display,
|
||||
|
||||
_gdk_x11_screen_init_visuals (screen);
|
||||
_gdk_x11_screen_init_root_window (screen);
|
||||
|
||||
update_bounding_box (screen);
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
@@ -1119,11 +1147,13 @@ process_monitors_change (GdkScreen *screen)
|
||||
x11_screen->monitors, x11_screen->n_monitors) ||
|
||||
x11_screen->primary_monitor != primary_monitor;
|
||||
|
||||
|
||||
free_monitors (monitors, n_monitors);
|
||||
|
||||
if (changed)
|
||||
g_signal_emit_by_name (screen, "monitors-changed");
|
||||
{
|
||||
update_bounding_box (screen);
|
||||
g_signal_emit_by_name (screen, "monitors-changed");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1470,6 +1500,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
|
||||
GdkX11Screen *x11_screen;
|
||||
NetWmSupportedAtoms *supported_atoms;
|
||||
GdkDisplay *display;
|
||||
Atom atom;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
|
||||
|
||||
@@ -1521,13 +1552,12 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
|
||||
if (supported_atoms->atoms == NULL)
|
||||
return FALSE;
|
||||
|
||||
i = 0;
|
||||
while (i < supported_atoms->n_atoms)
|
||||
{
|
||||
if (supported_atoms->atoms[i] == gdk_x11_atom_to_xatom_for_display (display, property))
|
||||
return TRUE;
|
||||
atom = gdk_x11_atom_to_xatom_for_display (display, property);
|
||||
|
||||
++i;
|
||||
for (i = 0; i < supported_atoms->n_atoms; i++)
|
||||
{
|
||||
if (supported_atoms->atoms[i] == atom)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -47,6 +47,9 @@ struct _GdkX11Screen
|
||||
GdkX11Monitor *monitors;
|
||||
gint primary_monitor;
|
||||
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
/* Xft resources for the display, used for default values for
|
||||
* the Xft/ XSETTINGS
|
||||
*/
|
||||
|
||||
@@ -87,12 +87,28 @@ gdk_x11_visual_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (gdk_x11_visual_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_visual_dispose (GObject *object)
|
||||
{
|
||||
GdkVisual *visual = (GdkVisual *)object;
|
||||
GdkX11Visual *x11_visual = (GdkX11Visual *)object;
|
||||
|
||||
if (x11_visual->colormap != None)
|
||||
{
|
||||
XFreeColormap (GDK_SCREEN_XDISPLAY (visual->screen), x11_visual->colormap);
|
||||
x11_visual->colormap = None;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_x11_visual_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_visual_class_init (GdkX11VisualClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = gdk_x11_visual_finalize;
|
||||
object_class->dispose = gdk_x11_visual_dispose;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+41
-8
@@ -157,6 +157,7 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
|
||||
impl->toplevel_window_type = -1;
|
||||
impl->device_cursor = g_hash_table_new_full (NULL, NULL,
|
||||
NULL, g_object_unref);
|
||||
impl->frame_sync_enabled = TRUE;
|
||||
}
|
||||
|
||||
GdkToplevelX11 *
|
||||
@@ -403,7 +404,8 @@ gdk_x11_window_end_frame (GdkWindow *window)
|
||||
impl->toplevel->extended_update_counter,
|
||||
impl->toplevel->current_counter_value);
|
||||
|
||||
if (gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
|
||||
if (impl->frame_sync_enabled &&
|
||||
gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
|
||||
gdk_atom_intern_static_string ("_NET_WM_FRAME_DRAWN")))
|
||||
{
|
||||
impl->toplevel->frame_pending = TRUE;
|
||||
@@ -1077,15 +1079,15 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
|
||||
class = InputOnly;
|
||||
}
|
||||
|
||||
if (window->width > 65535 ||
|
||||
window->height > 65535)
|
||||
if (window->width > 32767 ||
|
||||
window->height > 32767)
|
||||
{
|
||||
g_warning ("Native Windows wider or taller than 65535 pixels are not supported");
|
||||
g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
|
||||
|
||||
if (window->width > 65535)
|
||||
window->width = 65535;
|
||||
if (window->height > 65535)
|
||||
window->height = 65535;
|
||||
if (window->width > 32767)
|
||||
window->width = 32767;
|
||||
if (window->height > 32767)
|
||||
window->height = 32767;
|
||||
}
|
||||
|
||||
impl->xid = XCreateWindow (xdisplay, xparent,
|
||||
@@ -5306,6 +5308,37 @@ gdk_x11_window_get_xid (GdkWindow *window)
|
||||
return GDK_WINDOW_IMPL_X11 (window->impl)->xid;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_x11_window_set_frame_sync_enabled:
|
||||
* @window: (type GdkX11Window): a native #GdkWindow
|
||||
* @frame_sync_enabled: whether frame-synchronization should be enabled
|
||||
*
|
||||
* This function can be used to disable frame synchronization for a window.
|
||||
* Normally frame synchronziation will be enabled or disabled based on whether
|
||||
* the system has a compositor that supports frame synchronization, but if
|
||||
* the window is not directly managed by the window manager, then frame
|
||||
* synchronziation may need to be disabled. This is the case for a window
|
||||
* embedded via the XEMBED protocol.
|
||||
*
|
||||
* Since: 3.8
|
||||
*/
|
||||
void
|
||||
gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
|
||||
gboolean frame_sync_enabled)
|
||||
{
|
||||
/* Try to ensure the window has a native window */
|
||||
if (!_gdk_window_has_impl (window))
|
||||
gdk_window_ensure_native (window);
|
||||
|
||||
if (!GDK_WINDOW_IS_X11 (window))
|
||||
{
|
||||
g_warning (G_STRLOC " drawable is not a native X11 window");
|
||||
return;
|
||||
}
|
||||
|
||||
GDK_WINDOW_IMPL_X11 (window->impl)->frame_sync_enabled = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
|
||||
{
|
||||
|
||||
@@ -73,6 +73,7 @@ struct _GdkWindowImplX11
|
||||
* unset during resizing and scaling */
|
||||
guint override_redirect : 1;
|
||||
guint frame_clock_connected : 1;
|
||||
guint frame_sync_enabled : 1;
|
||||
|
||||
cairo_surface_t *cairo_surface;
|
||||
|
||||
@@ -172,6 +173,8 @@ GType gdk_window_impl_x11_get_type (void);
|
||||
|
||||
void gdk_x11_window_set_user_time (GdkWindow *window,
|
||||
guint32 timestamp);
|
||||
void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
|
||||
gboolean frame_sync_enabled);
|
||||
|
||||
GdkToplevelX11 *_gdk_x11_window_get_toplevel (GdkWindow *window);
|
||||
void _gdk_x11_window_tmp_unset_bg (GdkWindow *window,
|
||||
|
||||
@@ -67,6 +67,10 @@ void gdk_x11_window_set_hide_titlebar_when_maximized (GdkWindow *window,
|
||||
gboolean hide_titlebar_when_maximized);
|
||||
void gdk_x11_window_move_to_current_desktop (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_3_8
|
||||
void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
|
||||
gboolean frame_sync_enabled);
|
||||
|
||||
/**
|
||||
* GDK_WINDOW_XDISPLAY:
|
||||
* @win: a #GdkWindow.
|
||||
|
||||
+26
-12
@@ -884,6 +884,7 @@ gtk_base_c_sources = \
|
||||
$(gtk_clipboard_dnd_c_sources) \
|
||||
$(gtk_appchooser_impl_c_sources)
|
||||
|
||||
nodist_gtk_c_sources =
|
||||
gtk_c_sources = $(gtk_base_c_sources)
|
||||
gtk_all_c_sources = $(gtk_base_c_sources)
|
||||
|
||||
@@ -896,6 +897,9 @@ $(gtk_dbus_built_sources) : Makefile.am gtkdbusinterfaces.xml
|
||||
--generate-c-code gtkdbusgenerated \
|
||||
$(srcdir)/gtkdbusinterfaces.xml
|
||||
|
||||
nodist_gtk_c_sources += $(gtk_dbus_built_sources)
|
||||
gtk_all_c_sources += $(gtk_dbus_built_sources)
|
||||
|
||||
gtk_os_unix_c_sources = \
|
||||
gtkcustompaperunixdialog.c \
|
||||
gtkpagesetupunixdialog.c \
|
||||
@@ -907,8 +911,7 @@ gtk_os_unix_c_sources = \
|
||||
gtkprintoperation-unix.c \
|
||||
gtkprintunixdialog.c \
|
||||
gtkprintbackend.c \
|
||||
gtksearchenginetracker.c \
|
||||
$(gtk_dbus_built_sources)
|
||||
gtksearchenginetracker.c
|
||||
gtk_all_c_sources += $(gtk_os_unix_c_sources)
|
||||
if OS_UNIX
|
||||
gtk_private_h_sources += \
|
||||
@@ -920,8 +923,6 @@ gtk_private_h_sources += \
|
||||
gtkprinteroptionwidget.h \
|
||||
gtksearchenginetracker.h
|
||||
gtk_c_sources += $(gtk_os_unix_c_sources)
|
||||
else
|
||||
gtk_c_sources += $(gtk_dbus_built_sources)
|
||||
endif
|
||||
|
||||
gtk_os_win32_c_sources = \
|
||||
@@ -1025,14 +1026,12 @@ gtk_built_public_sources = \
|
||||
|
||||
# built headers that don't get installed
|
||||
gtk_built_private_headers = \
|
||||
gtkdbusgenerated.h \
|
||||
gtkresources.h \
|
||||
gtkmarshalers.h \
|
||||
gtkbuiltincache.h \
|
||||
gtkprivatetypebuiltins.h
|
||||
|
||||
gtk_built_sources = \
|
||||
gtkdbusgenerated.c \
|
||||
gtkresources.c \
|
||||
gtktypebuiltins.c \
|
||||
gtktypefuncs.c \
|
||||
@@ -1069,6 +1068,7 @@ gtk_extra_sources = \
|
||||
#
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(gtk_built_sources) \
|
||||
$(gtk_dbus_built_sources) \
|
||||
$(stamp_files) \
|
||||
$(GENERATED_ICONS) \
|
||||
stock-icons/icon-theme.cache
|
||||
@@ -1098,7 +1098,10 @@ DND_CURSORS = \
|
||||
gen_sources = xgen-gdef xgen-gtbh xgen-gtic xgen-gmh xgen-gmc xgen-gmlh xgen-gmlc xgen-gtfsrc.c xgen-gtf
|
||||
CLEANFILES = $(gen_sources)
|
||||
|
||||
BUILT_SOURCES = $(gtk_built_sources) stamp-icons
|
||||
BUILT_SOURCES = \
|
||||
$(gtk_built_sources) \
|
||||
$(gtk_dbus_built_sources) \
|
||||
stamp-icons
|
||||
|
||||
# all autogenerated files need to be generated in the srcdir,
|
||||
# so old versions get remade and are not confused with newer
|
||||
@@ -1175,6 +1178,7 @@ deprecatedinclude_HEADERS= $(deprecated_h_sources)
|
||||
gtkunixprintincludedir = $(includedir)/gtk-3.0/unix-print/gtk
|
||||
gtkunixprintinclude_HEADERS = $(gtk_unix_print_public_h_sources)
|
||||
|
||||
nodist_libgtk_3_la_SOURCES = $(nodist_gtk_c_sources)
|
||||
libgtk_3_la_SOURCES = $(gtk_c_sources)
|
||||
libgtk_3_la_LDFLAGS = $(libtool_opts)
|
||||
libgtk_3_la_LIBADD = $(libadd)
|
||||
@@ -1265,13 +1269,24 @@ LDADDS = \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
# The Quartz clipboard and dnd files aren't annotated for
|
||||
# introspection. Rather than copy the annotations over from the
|
||||
# regular files, exclude the quartz ones:
|
||||
introspection_files = \
|
||||
$(filter-out %private.h gtktextdisplay.h gtktextlayout.h, $(gtkinclude_HEADERS) $(deprecatedinclude_HEADERS)) \
|
||||
$(gtk_base_c_sources) \
|
||||
$(filter-out gtkclipboard-quartz.c gtkdnd-quartz.c, \
|
||||
$(gtk_base_c_sources)) \
|
||||
gtkprintoperation-unix.c \
|
||||
gtktypebuiltins.h \
|
||||
gtktypebuiltins.c
|
||||
|
||||
# And include the regular ones:
|
||||
if USE_QUARTZ
|
||||
introspection_files += \
|
||||
gtkclipboard.c \
|
||||
gtkdnd.c
|
||||
endif
|
||||
|
||||
if USE_X11
|
||||
introspection_files += \
|
||||
gtksocket.c \
|
||||
@@ -1308,7 +1323,9 @@ endif
|
||||
#
|
||||
# Installed tools
|
||||
#
|
||||
bin_PROGRAMS = gtk-query-immodules-3.0
|
||||
bin_PROGRAMS = \
|
||||
gtk-query-immodules-3.0 \
|
||||
gtk-launch
|
||||
|
||||
if BUILD_ICON_CACHE
|
||||
bin_PROGRAMS += gtk-update-icon-cache
|
||||
@@ -1355,11 +1372,8 @@ gtk_update_icon_cache_LDADD = $(GDK_PIXBUF_LIBS)
|
||||
gtk_update_icon_cache_SOURCES = updateiconcache.c
|
||||
endif
|
||||
|
||||
if HAVE_GIO_UNIX
|
||||
bin_PROGRAMS += gtk-launch
|
||||
gtk_launch_LDADD = $(LDADDS)
|
||||
gtk_launch_SOURCES = gtk-launch.c
|
||||
endif
|
||||
|
||||
.PHONY: files test test-debug
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ gtka11y_private_h_sources = \
|
||||
gtkcellaccessibleprivate.h \
|
||||
gtkcolorswatchaccessibleprivate.h \
|
||||
gtkiconviewaccessibleprivate.h \
|
||||
gtklabelaccessibleprivate.h \
|
||||
gtklockbuttonaccessibleprivate.h \
|
||||
gtktextviewaccessibleprivate.h \
|
||||
gtktreeviewaccessibleprivate.h \
|
||||
|
||||
@@ -572,9 +572,17 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
|
||||
gchar *text;
|
||||
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
|
||||
GTK_ENTRY_ICON_PRIMARY);
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
if (text)
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
text);
|
||||
g_free (text);
|
||||
g_free (text);
|
||||
}
|
||||
else
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
"");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "secondary-icon-tooltip-text") == 0)
|
||||
@@ -584,9 +592,17 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
|
||||
gchar *text;
|
||||
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
|
||||
GTK_ENTRY_ICON_SECONDARY);
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
|
||||
if (text)
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
|
||||
text);
|
||||
g_free (text);
|
||||
g_free (text);
|
||||
}
|
||||
else
|
||||
{
|
||||
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
|
||||
"");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "primary-icon-activatable") == 0)
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkpango.h>
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtklabelaccessible.h"
|
||||
|
||||
struct _GtkLabelAccessiblePrivate
|
||||
{
|
||||
gchar *text;
|
||||
gint cursor_position;
|
||||
gint selection_bound;
|
||||
};
|
||||
@@ -46,16 +46,11 @@ gtk_label_accessible_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkLabelAccessible *accessible;
|
||||
|
||||
ATK_OBJECT_CLASS (gtk_label_accessible_parent_class)->initialize (obj, data);
|
||||
|
||||
accessible = GTK_LABEL_ACCESSIBLE (obj);
|
||||
|
||||
widget = GTK_WIDGET (data);
|
||||
|
||||
accessible->priv->text = g_strdup (gtk_label_get_text (GTK_LABEL (widget)));
|
||||
|
||||
/*
|
||||
* Check whether ancestor of GtkLabel is a GtkButton and if so
|
||||
* set accessible parent for GtkLabelAccessible
|
||||
@@ -97,6 +92,45 @@ check_for_selection_change (GtkLabelAccessible *accessible,
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_label_accessible_text_deleted (GtkLabel *label)
|
||||
{
|
||||
AtkObject *obj;
|
||||
const char *text;
|
||||
guint length;
|
||||
|
||||
obj = _gtk_widget_peek_accessible (GTK_WIDGET (label));
|
||||
if (obj == NULL)
|
||||
return;
|
||||
|
||||
text = gtk_label_get_text (label);
|
||||
length = g_utf8_strlen (text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (obj, "text-changed::delete", 0, length);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_label_accessible_text_inserted (GtkLabel *label)
|
||||
{
|
||||
AtkObject *obj;
|
||||
const char *text;
|
||||
guint length;
|
||||
|
||||
obj = _gtk_widget_peek_accessible (GTK_WIDGET (label));
|
||||
if (obj == NULL)
|
||||
return;
|
||||
|
||||
text = gtk_label_get_text (label);
|
||||
length = g_utf8_strlen (text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (obj, "text-changed::insert", 0, length);
|
||||
|
||||
if (obj->name == NULL)
|
||||
/* The label has changed so notify a change in accessible-name */
|
||||
g_object_notify (G_OBJECT (obj), "accessible-name");
|
||||
|
||||
g_signal_emit_by_name (obj, "visible-data-changed");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
@@ -105,37 +139,10 @@ gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
GtkWidget *widget = GTK_WIDGET (obj);
|
||||
AtkObject* atk_obj = gtk_widget_get_accessible (widget);
|
||||
GtkLabelAccessible *accessible;
|
||||
gint length;
|
||||
|
||||
accessible = GTK_LABEL_ACCESSIBLE (atk_obj);
|
||||
|
||||
if (g_strcmp0 (pspec->name, "label") == 0)
|
||||
{
|
||||
const gchar *text;
|
||||
|
||||
text = gtk_label_get_text (GTK_LABEL (widget));
|
||||
if (g_strcmp0 (accessible->priv->text, text) == 0)
|
||||
return;
|
||||
|
||||
/* Create a delete text and an insert text signal */
|
||||
length = g_utf8_strlen (accessible->priv->text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (atk_obj, "text-changed::delete", 0, length);
|
||||
|
||||
g_free (accessible->priv->text);
|
||||
accessible->priv->text = g_strdup (text);
|
||||
|
||||
length = g_utf8_strlen (accessible->priv->text, -1);
|
||||
if (length > 0)
|
||||
g_signal_emit_by_name (atk_obj, "text-changed::insert", 0, length);
|
||||
|
||||
if (atk_obj->name == NULL)
|
||||
/* The label has changed so notify a change in accessible-name */
|
||||
g_object_notify (G_OBJECT (atk_obj), "accessible-name");
|
||||
|
||||
g_signal_emit_by_name (atk_obj, "visible-data-changed");
|
||||
}
|
||||
else if (g_strcmp0 (pspec->name, "cursor-position") == 0)
|
||||
if (g_strcmp0 (pspec->name, "cursor-position") == 0)
|
||||
{
|
||||
g_signal_emit_by_name (atk_obj, "text-caret-moved",
|
||||
_gtk_label_get_cursor_position (GTK_LABEL (widget)));
|
||||
@@ -151,17 +158,6 @@ gtk_label_accessible_notify_gtk (GObject *obj,
|
||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_accessible_finalize (GObject *object)
|
||||
{
|
||||
GtkLabelAccessible *accessible = GTK_LABEL_ACCESSIBLE (object);
|
||||
|
||||
g_free (accessible->priv->text);
|
||||
|
||||
G_OBJECT_CLASS (gtk_label_accessible_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
/* atkobject.h */
|
||||
|
||||
static AtkStateSet *
|
||||
@@ -274,11 +270,8 @@ gtk_label_accessible_get_name (AtkObject *accessible)
|
||||
static void
|
||||
gtk_label_accessible_class_init (GtkLabelAccessibleClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
|
||||
|
||||
gobject_class->finalize = gtk_label_accessible_finalize;
|
||||
GtkWidgetAccessibleClass *widget_class = GTK_WIDGET_ACCESSIBLE_CLASS (klass);
|
||||
|
||||
widget_class->notify_gtk = gtk_label_accessible_notify_gtk;
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* GTK+ - accessibility implementations
|
||||
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_LABEL_ACCESSIBLE_PRIVATE_H__
|
||||
#define __GTK_LABEL_ACCESSIBLE_PRIVATE_H__
|
||||
|
||||
#include <gtk/a11y/gtklabelaccessible.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void _gtk_label_accessible_text_deleted (GtkLabel *label);
|
||||
void _gtk_label_accessible_text_inserted (GtkLabel *label);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_LABEL_ACCESSIBLE_PRIVATE_H__ */
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtkrangeaccessible.h"
|
||||
|
||||
struct _GtkRangeAccessiblePrivate
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
};
|
||||
|
||||
static void atk_value_interface_init (AtkValueIface *iface);
|
||||
|
||||
@@ -35,47 +39,45 @@ gtk_range_accessible_value_changed (GtkAdjustment *adjustment,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_range_accessible_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
gtk_range_accessible_widget_set (GtkAccessible *accessible)
|
||||
{
|
||||
GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (obj);
|
||||
GtkRangeAccessiblePrivate *priv = GTK_RANGE_ACCESSIBLE (accessible)->priv;
|
||||
GtkWidget *range;
|
||||
GtkAdjustment *adj;
|
||||
GtkRange *gtk_range;
|
||||
|
||||
ATK_OBJECT_CLASS (gtk_range_accessible_parent_class)->initialize (obj, data);
|
||||
|
||||
gtk_range = GTK_RANGE (data);
|
||||
/*
|
||||
* If a GtkAdjustment already exists for the GtkRange,
|
||||
* create the GailAdjustment
|
||||
*/
|
||||
adj = gtk_range_get_adjustment (gtk_range);
|
||||
range = gtk_accessible_get_widget (accessible);
|
||||
adj = gtk_range_get_adjustment (GTK_RANGE (range));
|
||||
if (adj)
|
||||
g_signal_connect (adj, "value-changed",
|
||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
||||
range);
|
||||
|
||||
obj->role = ATK_ROLE_SLIDER;
|
||||
{
|
||||
priv->adjustment = adj;
|
||||
g_object_ref (priv->adjustment);
|
||||
g_signal_connect (priv->adjustment, "value-changed",
|
||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
||||
accessible);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_range_accessible_finalize (GObject *object)
|
||||
gtk_range_accessible_widget_unset (GtkAccessible *accessible)
|
||||
{
|
||||
GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (object);
|
||||
GtkWidget *widget;
|
||||
GtkAdjustment *adj;
|
||||
GtkRangeAccessiblePrivate *priv = GTK_RANGE_ACCESSIBLE (accessible)->priv;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
|
||||
if (widget)
|
||||
if (priv->adjustment)
|
||||
{
|
||||
adj = gtk_range_get_adjustment (GTK_RANGE (widget));
|
||||
if (adj)
|
||||
g_signal_handlers_disconnect_by_func (adj,
|
||||
gtk_range_accessible_value_changed,
|
||||
range);
|
||||
g_signal_handlers_disconnect_by_func (priv->adjustment,
|
||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
||||
accessible);
|
||||
g_object_unref (priv->adjustment);
|
||||
priv->adjustment = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_range_accessible_parent_class)->finalize (object);
|
||||
static void
|
||||
gtk_range_accessible_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
{
|
||||
ATK_OBJECT_CLASS (gtk_range_accessible_parent_class)->initialize (obj, data);
|
||||
obj->role = ATK_ROLE_SLIDER;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -83,16 +85,13 @@ gtk_range_accessible_notify_gtk (GObject *obj,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (obj);
|
||||
GtkAdjustment *adj;
|
||||
AtkObject *range;
|
||||
|
||||
if (strcmp (pspec->name, "adjustment") == 0)
|
||||
{
|
||||
range = gtk_widget_get_accessible (widget);
|
||||
adj = gtk_range_get_adjustment (GTK_RANGE (widget));
|
||||
g_signal_connect (adj, "value-changed",
|
||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
||||
range);
|
||||
gtk_range_accessible_widget_unset (GTK_ACCESSIBLE (range));
|
||||
gtk_range_accessible_widget_set (GTK_ACCESSIBLE (range));
|
||||
}
|
||||
else
|
||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_range_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||
@@ -102,20 +101,26 @@ gtk_range_accessible_notify_gtk (GObject *obj,
|
||||
static void
|
||||
gtk_range_accessible_class_init (GtkRangeAccessibleClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
GtkAccessibleClass *accessible_class = (GtkAccessibleClass*)klass;
|
||||
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
|
||||
|
||||
widget_class->notify_gtk = gtk_range_accessible_notify_gtk;
|
||||
|
||||
class->initialize = gtk_range_accessible_initialize;
|
||||
|
||||
gobject_class->finalize = gtk_range_accessible_finalize;
|
||||
accessible_class->widget_set = gtk_range_accessible_widget_set;
|
||||
accessible_class->widget_unset = gtk_range_accessible_widget_unset;
|
||||
|
||||
widget_class->notify_gtk = gtk_range_accessible_notify_gtk;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkRangeAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_range_accessible_init (GtkRangeAccessible *range)
|
||||
{
|
||||
range->priv = G_TYPE_INSTANCE_GET_PRIVATE (range,
|
||||
GTK_TYPE_RANGE_ACCESSIBLE,
|
||||
GtkRangeAccessiblePrivate);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtkspinbuttonaccessible.h"
|
||||
|
||||
struct _GtkSpinButtonAccessiblePrivate
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
};
|
||||
|
||||
static void atk_value_interface_init (AtkValueIface *iface);
|
||||
|
||||
@@ -31,31 +35,48 @@ static void
|
||||
gtk_spin_button_accessible_value_changed (GtkAdjustment *adjustment,
|
||||
gpointer data)
|
||||
{
|
||||
GtkSpinButtonAccessible *spin_button;
|
||||
g_object_notify (G_OBJECT (data), "accessible-value");
|
||||
}
|
||||
|
||||
if (adjustment == NULL || data == NULL)
|
||||
return;
|
||||
static void
|
||||
gtk_spin_button_accessible_widget_set (GtkAccessible *accessible)
|
||||
{
|
||||
GtkSpinButtonAccessiblePrivate *priv = GTK_SPIN_BUTTON_ACCESSIBLE (accessible)->priv;
|
||||
GtkWidget *spin;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
spin_button = GTK_SPIN_BUTTON_ACCESSIBLE (data);
|
||||
spin = gtk_accessible_get_widget (accessible);
|
||||
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin));
|
||||
if (adj)
|
||||
{
|
||||
priv->adjustment = adj;
|
||||
g_object_ref (priv->adjustment);
|
||||
g_signal_connect (priv->adjustment, "value-changed",
|
||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
||||
accessible);
|
||||
}
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (spin_button), "accessible-value");
|
||||
static void
|
||||
gtk_spin_button_accessible_widget_unset (GtkAccessible *accessible)
|
||||
{
|
||||
GtkSpinButtonAccessiblePrivate *priv = GTK_SPIN_BUTTON_ACCESSIBLE (accessible)->priv;
|
||||
|
||||
if (priv->adjustment)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (priv->adjustment,
|
||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
||||
accessible);
|
||||
g_object_unref (priv->adjustment);
|
||||
priv->adjustment = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spin_button_accessible_initialize (AtkObject *obj,
|
||||
gpointer data)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
ATK_OBJECT_CLASS (gtk_spin_button_accessible_parent_class)->initialize (obj, data);
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (data));
|
||||
if (adjustment)
|
||||
g_signal_connect_object (adjustment,
|
||||
"value-changed",
|
||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
||||
obj, 0);
|
||||
|
||||
obj->role = ATK_ROLE_SPIN_BUTTON;
|
||||
}
|
||||
|
||||
@@ -64,37 +85,43 @@ gtk_spin_button_accessible_notify_gtk (GObject *obj,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (obj);
|
||||
GtkSpinButtonAccessible *spin_button = GTK_SPIN_BUTTON_ACCESSIBLE (gtk_widget_get_accessible (widget));
|
||||
AtkObject *spin;
|
||||
|
||||
if (strcmp (pspec->name, "adjustment") == 0)
|
||||
{
|
||||
GtkAdjustment* adjustment;
|
||||
spin = gtk_widget_get_accessible (widget);
|
||||
gtk_spin_button_accessible_widget_unset (GTK_ACCESSIBLE (spin));
|
||||
gtk_spin_button_accessible_widget_set (GTK_ACCESSIBLE (spin));
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
|
||||
g_signal_connect_object (adjustment, "value-changed",
|
||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
||||
spin_button, 0);
|
||||
}
|
||||
else
|
||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_spin_button_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
gtk_spin_button_accessible_class_init (GtkSpinButtonAccessibleClass *klass)
|
||||
{
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
GtkAccessibleClass *accessible_class = (GtkAccessibleClass*)klass;
|
||||
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
|
||||
|
||||
class->initialize = gtk_spin_button_accessible_initialize;
|
||||
|
||||
accessible_class->widget_set = gtk_spin_button_accessible_widget_set;
|
||||
accessible_class->widget_unset = gtk_spin_button_accessible_widget_unset;
|
||||
|
||||
widget_class->notify_gtk = gtk_spin_button_accessible_notify_gtk;
|
||||
|
||||
class->initialize = gtk_spin_button_accessible_initialize;
|
||||
g_type_class_add_private (klass, sizeof (GtkSpinButtonAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spin_button_accessible_init (GtkSpinButtonAccessible *button)
|
||||
{
|
||||
button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
|
||||
GTK_TYPE_SPIN_BUTTON_ACCESSIBLE,
|
||||
GtkSpinButtonAccessiblePrivate);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -53,23 +53,11 @@ gtk_switch_accessible_ref_state_set (AtkObject *accessible)
|
||||
return state_set;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_switch_accessible_initialize (AtkObject *accessible,
|
||||
gpointer widget)
|
||||
{
|
||||
ATK_OBJECT_CLASS (gtk_switch_accessible_parent_class)->initialize (accessible, widget);
|
||||
|
||||
atk_object_set_role (accessible, ATK_ROLE_TOGGLE_BUTTON);
|
||||
atk_object_set_name (accessible, C_("light switch widget", "Switch"));
|
||||
atk_object_set_description (accessible, _("Switches between on and off states"));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_switch_accessible_class_init (GtkSwitchAccessibleClass *klass)
|
||||
{
|
||||
AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
|
||||
|
||||
atk_class->initialize = gtk_switch_accessible_initialize;
|
||||
atk_class->ref_state_set = gtk_switch_accessible_ref_state_set;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ gtk_widget_accessible_ref_relation_set (AtkObject *obj)
|
||||
label = find_label (widget);
|
||||
if (label == NULL)
|
||||
{
|
||||
if (GTK_IS_BUTTON (widget))
|
||||
if (GTK_IS_BUTTON (widget) && gtk_widget_get_mapped (widget))
|
||||
/*
|
||||
* Handle the case where GnomeIconEntry is the mnemonic widget.
|
||||
* The GtkButton which is a grandchild of the GnomeIconEntry
|
||||
@@ -784,6 +784,9 @@ gtk_widget_accessible_on_screen (GtkWidget *widget)
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
if (!gtk_widget_get_mapped (widget))
|
||||
return FALSE;
|
||||
|
||||
viewport = gtk_widget_get_ancestor (widget, GTK_TYPE_VIEWPORT);
|
||||
if (viewport)
|
||||
{
|
||||
|
||||
@@ -342,7 +342,8 @@ _gtk_gradient_resolve_full (GtkGradient *gradient,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
&stop_deps);
|
||||
&stop_deps,
|
||||
NULL);
|
||||
if (val)
|
||||
{
|
||||
rgba = *_gtk_css_rgba_value_get_rgba (val);
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
* from #GtkBox. No further changes are needed, since the default
|
||||
* value of the #GtkOrientable:orientation property is
|
||||
* %GTK_ORIENTATION_HORIZONTAL.
|
||||
* If you want your code to be future-proof, the recommendation is to
|
||||
* switch to #GtkGrid, since #GtkBox is going to be deprecated in favor
|
||||
* of the more flexible grid widget eventually. For more information
|
||||
* about migrating to #GtkGrid, see <xref linkend="gtk-migrating-GtkGrid"/>
|
||||
* If you don't need first-child or last-child styling, and want your code
|
||||
* to be future-proof, the recommendation is to switch to #GtkGrid instead
|
||||
* of nested boxes. For more information about migrating to #GtkGrid,
|
||||
* see <xref linkend="gtk-migrating-GtkGrid"/>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -307,6 +307,7 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
|
||||
GTK_STYLE_PROVIDER_PRIVATE (props),
|
||||
current,
|
||||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
_gtk_css_value_unref (current);
|
||||
if (v == NULL)
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
* gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
|
||||
* GTK_ORIENTATION_VERTICAL);
|
||||
* ]|
|
||||
* If you want your code to be future-proof, the recommendation is to
|
||||
* switch to #GtkGrid, since #GtkBox is going to be deprecated in favor
|
||||
* of the more flexible grid widget eventually. For more information
|
||||
* about migrating to #GtkGrid, see <xref linkend="gtk-migrating-GtkGrid"/>.
|
||||
* If you don't need first-child or last-child styling and want your code
|
||||
* to be future-proof, the recommendation is to switch to #GtkGrid instead
|
||||
* of nested boxes. For more information about migrating to #GtkGrid,
|
||||
* see <xref linkend="gtk-migrating-GtkGrid"/>.
|
||||
*/
|
||||
|
||||
G_DEFINE_TYPE (GtkVBox, gtk_vbox, GTK_TYPE_BOX)
|
||||
|
||||
+383
-25
@@ -129,7 +129,7 @@ GtkAssistant .sidebar .highlight {
|
||||
border-width: 0;
|
||||
-GtkWidget-focus-line-width: 1;
|
||||
-GtkWidget-focus-padding: 3;
|
||||
-GtkButton-interior-focuse: true;
|
||||
-GtkButton-interior-focus: true;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
@@ -432,19 +432,26 @@ GtkButton.check:active:prelight {
|
||||
.scale {
|
||||
background-color: transparent;
|
||||
-GtkScale-value-spacing: 0;
|
||||
-GtkScale-slider-length: 9;
|
||||
-GtkScale-slider-length: 12;
|
||||
-GtkRange-slider-width: 20;
|
||||
-GtkRange-trough-border: 0;
|
||||
}
|
||||
|
||||
.scale.trough {
|
||||
margin: 8px 0;
|
||||
border-style: none;
|
||||
border-width: 0;
|
||||
background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (2 0 2 0));
|
||||
background-image: -gtk-win32-theme-part(trackbar, 1 1);
|
||||
}
|
||||
|
||||
.scale.trough.vertical {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (0 2 0 2));
|
||||
margin: 0 8px;
|
||||
background-image: -gtk-win32-theme-part(trackbar, 1 1);
|
||||
}
|
||||
|
||||
.scale.mark.separator {
|
||||
/* defines the color of the actuall marks on the scale */
|
||||
color: shade(@bg_color, 0.6);
|
||||
}
|
||||
|
||||
.scale.slider {
|
||||
@@ -493,89 +500,89 @@ GtkButton.check:active:prelight {
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 1);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 1, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below:prelight {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 2);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 2, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below:active,
|
||||
.scale.slider.scale-has-marks-below:prelight:active {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 3);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 3, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below:focus {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 4);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 4, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below:insensitive {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 5);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 4 5, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below.vertical {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 1);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 1, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below.vertical:prelight {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 2);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 2, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below.vertical:active,
|
||||
.scale.slider.scale-has-marks-below.vertical:prelight:active {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 3);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 3, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below.vertical:focus {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 4);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 4, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-below.vertical:insensitive {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 5);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 8 5, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
.scale.slider.scale-has-marks-above {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 1);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 1, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above:prelight {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 2);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 2, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above:active,
|
||||
.scale.slider.scale-has-marks-above:prelight:active {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 3);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 3, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above:focus {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 4);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 4, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above:insensitive {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 5);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 5 5, margins(0 -2 0 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above.vertical {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 1);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 1, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above.vertical:prelight {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 2);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 2, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above.vertical:active,
|
||||
.scale.slider.scale-has-marks-above.vertical:prelight:active {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 3);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 3, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above.vertical:focus {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 4);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 4, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
.scale.slider.scale-has-marks-above.vertical:insensitive {
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 5);
|
||||
background-image: -gtk-win32-theme-part(trackbar, 7 5, margins(0 0 -2 0));
|
||||
}
|
||||
|
||||
/* Progress bars */
|
||||
@@ -791,7 +798,7 @@ GtkSwitch.trough:active {
|
||||
/* Assistant */
|
||||
|
||||
GtkAssistant .sidebar .highlight {
|
||||
background-color: blue;
|
||||
background-color: gray;
|
||||
font: bold;
|
||||
}
|
||||
|
||||
@@ -834,3 +841,354 @@ GtkStatusbar > GtkFrame {
|
||||
background-image: -gtk-win32-theme-part(status, 3 1);
|
||||
}
|
||||
*/
|
||||
|
||||
@keyframes spinner {
|
||||
0% { background-image: none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
0% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
8% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none; }
|
||||
8% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)); }
|
||||
16% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)); }
|
||||
16% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)); }
|
||||
25% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)); }
|
||||
25% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)); }
|
||||
33% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)); }
|
||||
33% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)); }
|
||||
41% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)); }
|
||||
41% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)); }
|
||||
50% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)); }
|
||||
50% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)); }
|
||||
58% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)); }
|
||||
58% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)); }
|
||||
66% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)); }
|
||||
66% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)); }
|
||||
75% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)); }
|
||||
75% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)); }
|
||||
83% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)); }
|
||||
83% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)); }
|
||||
91% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)); }
|
||||
91% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)); }
|
||||
100% { background-image: none,
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
100% { background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)); }
|
||||
}
|
||||
|
||||
.spinner {
|
||||
background-color: transparent;
|
||||
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
|
||||
background-position: 25.00% 6.70%, 6.70% 25.00%, 0.00% 50.00%, 6.70% 75.00%, 25.00% 93.30%, 50.00% 100.00%, 75.00% 93.30%, 93.30% 75.00%, 100.00% 50.00%, 93.30% 25.00%, 75.00% 6.70%, 50.00% 0.00%;
|
||||
background-size: 20% 20%;
|
||||
background-repeat: no-repeat;
|
||||
transition: background-image 500ms ease-out;
|
||||
}
|
||||
|
||||
.spinner:active {
|
||||
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.916667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.75)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.666667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.583333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.5)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.416667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.333333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.25)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.166667)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(alpha(currentColor, 0.0833333)), to(transparent)),
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
|
||||
animation: spinner 1s infinite linear;
|
||||
}
|
||||
|
||||
@@ -2160,14 +2160,14 @@ text_view_new (GtkAboutDialog *about,
|
||||
r1 = strstr (q0, "http://");
|
||||
if (r1)
|
||||
{
|
||||
r2 = strpbrk (r1, " \n\t");
|
||||
r2 = strpbrk (r1, " \n\t>");
|
||||
if (!r2)
|
||||
r2 = strchr (r1, '\0');
|
||||
}
|
||||
else
|
||||
r2 = NULL;
|
||||
|
||||
if (r1 && r2 && (!q1 || !q2 || (r1 < q1)))
|
||||
if (r1 && r2 && (!q1 || !q2 || (r1 <= q1 + 1)))
|
||||
{
|
||||
q1 = r1;
|
||||
q2 = r2;
|
||||
|
||||
@@ -348,6 +348,9 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
|
||||
{
|
||||
app = l->data;
|
||||
|
||||
if (!g_app_info_should_show (app))
|
||||
continue;
|
||||
|
||||
if (default_app != NULL && g_app_info_equal (app, default_app))
|
||||
continue;
|
||||
|
||||
|
||||
+13
-3
@@ -1422,7 +1422,9 @@ gtk_application_inhibit (GtkApplication *application,
|
||||
|
||||
g_return_val_if_fail (GTK_IS_APPLICATION (application), 0);
|
||||
g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), 0);
|
||||
g_return_val_if_fail (application->priv->sm_proxy != NULL, 0);
|
||||
|
||||
if (application->priv->sm_proxy == NULL)
|
||||
return 0;
|
||||
|
||||
if (window != NULL)
|
||||
{
|
||||
@@ -1431,8 +1433,10 @@ gtk_application_inhibit (GtkApplication *application,
|
||||
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
if (gdkwindow == NULL)
|
||||
g_warning ("Inhibit called with an unrealized window");
|
||||
else
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
else if (GDK_IS_X11_WINDOW (gdkwindow))
|
||||
xid = GDK_WINDOW_XID (gdkwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
|
||||
@@ -1475,6 +1479,10 @@ gtk_application_uninhibit (GtkApplication *application,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_APPLICATION (application));
|
||||
g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
|
||||
g_return_if_fail (cookie > 0);
|
||||
|
||||
/* Application could only obtain a cookie through a session
|
||||
* manager proxy, so it's valid to assert its presence here. */
|
||||
g_return_if_fail (application->priv->sm_proxy != NULL);
|
||||
|
||||
g_dbus_proxy_call (application->priv->sm_proxy,
|
||||
@@ -1507,7 +1515,9 @@ gtk_application_is_inhibited (GtkApplication *application,
|
||||
|
||||
g_return_val_if_fail (GTK_IS_APPLICATION (application), FALSE);
|
||||
g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), FALSE);
|
||||
g_return_val_if_fail (application->priv->sm_proxy != NULL, FALSE);
|
||||
|
||||
if (application->priv->sm_proxy == NULL)
|
||||
return FALSE;
|
||||
|
||||
res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
|
||||
"IsInhibited",
|
||||
|
||||
@@ -216,6 +216,7 @@ struct _GtkApplicationWindowPrivate
|
||||
GtkWidget *menubar;
|
||||
GtkAccelGroup *accels;
|
||||
GSList *accel_closures;
|
||||
guint accel_map_changed_id;
|
||||
|
||||
GMenu *app_menu_section;
|
||||
GMenu *menubar_section;
|
||||
@@ -752,7 +753,12 @@ gtk_application_window_real_realize (GtkWidget *widget)
|
||||
gtk_application_window_update_shell_shows_app_menu (window, settings);
|
||||
gtk_application_window_update_shell_shows_menubar (window, settings);
|
||||
gtk_application_window_update_menubar (window);
|
||||
|
||||
/* Update the accelerators, and ensure we do again
|
||||
* if the accel map changes */
|
||||
gtk_application_window_update_accels (window);
|
||||
window->priv->accel_map_changed_id = g_signal_connect_swapped (gtk_accel_map_get (), "changed",
|
||||
G_CALLBACK (gtk_application_window_update_accels), window);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_application_window_parent_class)
|
||||
->realize (widget);
|
||||
@@ -790,6 +796,7 @@ gtk_application_window_real_realize (GtkWidget *widget)
|
||||
static void
|
||||
gtk_application_window_real_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (widget);
|
||||
GtkSettings *settings;
|
||||
|
||||
settings = gtk_widget_get_settings (widget);
|
||||
@@ -797,6 +804,8 @@ gtk_application_window_real_unrealize (GtkWidget *widget)
|
||||
g_signal_handlers_disconnect_by_func (settings, gtk_application_window_shell_shows_app_menu_changed, widget);
|
||||
g_signal_handlers_disconnect_by_func (settings, gtk_application_window_shell_shows_menubar_changed, widget);
|
||||
|
||||
g_signal_handler_disconnect (gtk_accel_map_get (), window->priv->accel_map_changed_id);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_application_window_parent_class)
|
||||
->unrealize (widget);
|
||||
}
|
||||
|
||||
+7
-7
@@ -107,6 +107,7 @@ struct _GtkAssistantPrivate
|
||||
GtkWidget *last;
|
||||
|
||||
GtkWidget *sidebar;
|
||||
GtkWidget *sidebar_frame;
|
||||
GtkWidget *content;
|
||||
GtkWidget *action_area;
|
||||
|
||||
@@ -707,7 +708,7 @@ update_title_state (GtkAssistant *assistant)
|
||||
show_titles = TRUE;
|
||||
}
|
||||
|
||||
gtk_widget_set_visible (priv->sidebar, show_titles);
|
||||
gtk_widget_set_visible (priv->sidebar_frame, show_titles);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -956,7 +957,6 @@ gtk_assistant_init (GtkAssistant *assistant)
|
||||
GtkStyleContext *context;
|
||||
GtkWidget *main_box;
|
||||
GtkWidget *content_box;
|
||||
GtkWidget *sidebar_frame;
|
||||
|
||||
assistant->priv = G_TYPE_INSTANCE_GET_PRIVATE (assistant,
|
||||
GTK_TYPE_ASSISTANT,
|
||||
@@ -974,11 +974,11 @@ gtk_assistant_init (GtkAssistant *assistant)
|
||||
/* use a frame for the sidebar, and manually render a background
|
||||
* in it. GtkFrame also gives us padding support for free.
|
||||
*/
|
||||
sidebar_frame = gtk_frame_new (NULL);
|
||||
context = gtk_widget_get_style_context (sidebar_frame);
|
||||
priv->sidebar_frame = gtk_frame_new (NULL);
|
||||
context = gtk_widget_get_style_context (priv->sidebar_frame);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SIDEBAR);
|
||||
|
||||
g_signal_connect (sidebar_frame, "draw",
|
||||
g_signal_connect (priv->sidebar_frame, "draw",
|
||||
G_CALLBACK (assistant_sidebar_draw_cb), assistant);
|
||||
|
||||
content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
@@ -991,8 +991,8 @@ gtk_assistant_init (GtkAssistant *assistant)
|
||||
g_signal_connect (priv->content, "remove",
|
||||
G_CALLBACK (assistant_remove_page_cb), assistant);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sidebar_frame), priv->sidebar);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), sidebar_frame, FALSE, FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (priv->sidebar_frame), priv->sidebar);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), priv->sidebar_frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), content_box, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_box), priv->content, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_box), priv->action_area, FALSE, TRUE, 0);
|
||||
|
||||
+58
-20
@@ -189,6 +189,44 @@ gtk_bin_get_effective_border_width (GtkBin *bin)
|
||||
return gtk_container_get_border_width (GTK_CONTAINER (bin));
|
||||
}
|
||||
|
||||
/* GtkBin widgets define the padding and borders independantly so
|
||||
* we cannot provide a generic get_size() for the same reason
|
||||
* we never implemented size_request() here.
|
||||
*
|
||||
* But for cases where the GtkBin class's padding is constant and
|
||||
* does not vary based on allocation (most cases), we can at least
|
||||
* deduce a common code path for the get_width_for_height()/get_height_for_width()
|
||||
* cases by using the delta of the base size requsts.
|
||||
*/
|
||||
static void
|
||||
get_child_padding_delta (GtkBin *bin,
|
||||
gint *delta_h,
|
||||
gint *delta_v)
|
||||
{
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint hmin, vmin, hnat, vnat, child_hmin, child_vmin;
|
||||
|
||||
/* we can't use gtk_widget_get_preferred_width() wrapper
|
||||
* because we want our "original" request, not any external
|
||||
* adjustments from set_size_request() or whatever. we have
|
||||
* to ask for natural also because NULL isn't allowed for the
|
||||
* direct vfuncs
|
||||
*/
|
||||
GTK_WIDGET_GET_CLASS (bin)->get_preferred_width (GTK_WIDGET (bin), &hmin, &hnat);
|
||||
GTK_WIDGET_GET_CLASS (bin)->adjust_size_request (GTK_WIDGET (bin),
|
||||
GTK_ORIENTATION_HORIZONTAL, &hmin, &hnat);
|
||||
|
||||
GTK_WIDGET_GET_CLASS (bin)->get_preferred_height (GTK_WIDGET (bin), &vmin, &vnat);
|
||||
GTK_WIDGET_GET_CLASS (bin)->adjust_size_request (GTK_WIDGET (bin),
|
||||
GTK_ORIENTATION_VERTICAL, &vmin, &vnat);
|
||||
|
||||
gtk_widget_get_preferred_width (priv->child, &child_hmin, NULL);
|
||||
gtk_widget_get_preferred_height (priv->child, &child_vmin, NULL);
|
||||
|
||||
*delta_h = hmin - child_hmin;
|
||||
*delta_v = vmin - child_vmin;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum_width,
|
||||
@@ -249,25 +287,25 @@ gtk_bin_get_preferred_width_for_height (GtkWidget *widget,
|
||||
{
|
||||
GtkBin *bin = GTK_BIN (widget);
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
gint hdelta, vdelta, child_min, child_nat;
|
||||
|
||||
*minimum_width = 0;
|
||||
*natural_width = 0;
|
||||
|
||||
border_width = gtk_bin_get_effective_border_width (bin);
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
{
|
||||
gint child_min, child_nat;
|
||||
gtk_widget_get_preferred_width_for_height (priv->child, height - 2 * border_width,
|
||||
get_child_padding_delta (bin, &hdelta, &vdelta);
|
||||
|
||||
gtk_widget_get_preferred_width_for_height (priv->child,
|
||||
height - vdelta,
|
||||
&child_min, &child_nat);
|
||||
|
||||
*minimum_width = child_min;
|
||||
*natural_width = child_nat;
|
||||
if (minimum_width)
|
||||
*minimum_width = child_min + hdelta;
|
||||
|
||||
if (natural_width)
|
||||
*natural_width = child_nat + hdelta;
|
||||
}
|
||||
|
||||
*minimum_width += 2 * border_width;
|
||||
*natural_width += 2 * border_width;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -278,25 +316,25 @@ gtk_bin_get_preferred_height_for_width (GtkWidget *widget,
|
||||
{
|
||||
GtkBin *bin = GTK_BIN (widget);
|
||||
GtkBinPrivate *priv = bin->priv;
|
||||
gint border_width;
|
||||
gint hdelta, vdelta, child_min, child_nat;
|
||||
|
||||
*minimum_height = 0;
|
||||
*natural_height = 0;
|
||||
|
||||
border_width = gtk_bin_get_effective_border_width (bin);
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
{
|
||||
gint child_min, child_nat;
|
||||
gtk_widget_get_preferred_height_for_width (priv->child, width - 2 * border_width,
|
||||
get_child_padding_delta (bin, &hdelta, &vdelta);
|
||||
|
||||
gtk_widget_get_preferred_height_for_width (priv->child,
|
||||
width - hdelta,
|
||||
&child_min, &child_nat);
|
||||
|
||||
*minimum_height = child_min;
|
||||
*natural_height = child_nat;
|
||||
if (minimum_height)
|
||||
*minimum_height = child_min + vdelta;
|
||||
|
||||
if (natural_height)
|
||||
*natural_height = child_nat + vdelta;
|
||||
}
|
||||
|
||||
*minimum_height += 2 * border_width;
|
||||
*natural_height += 2 * border_width;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1355,12 +1355,6 @@ gtk_builder_get_translation_domain (GtkBuilder *builder)
|
||||
*
|
||||
* Add @object to the @builder object pool so it can be referenced just like any
|
||||
* other object built by builder.
|
||||
*
|
||||
* To make this function even more useful a new special entry point element
|
||||
* <external-object> is defined. It is similar to <object> but has
|
||||
* to reference an external object exposed with this function.
|
||||
* This way you can change properties and even add children to an
|
||||
* external object using builder, not just reference it.
|
||||
*
|
||||
* Since: 3.8
|
||||
**/
|
||||
|
||||
+10
-4
@@ -1784,10 +1784,13 @@ gtk_button_button_press (GtkWidget *widget,
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
if (event->button == GDK_BUTTON_PRIMARY)
|
||||
g_signal_emit (button, button_signals[PRESSED], 0);
|
||||
{
|
||||
g_signal_emit (button, button_signals[PRESSED], 0);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1800,9 +1803,10 @@ gtk_button_button_release (GtkWidget *widget,
|
||||
{
|
||||
button = GTK_BUTTON (widget);
|
||||
g_signal_emit (button, button_signals[RELEASED], 0);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1818,13 +1822,15 @@ gtk_button_touch (GtkWidget *widget,
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
g_signal_emit (button, button_signals[PRESSED], 0);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
else if (event->type == GDK_TOUCH_END)
|
||||
{
|
||||
g_signal_emit (button, button_signals[RELEASED], 0);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
+1
-1
@@ -3440,7 +3440,7 @@ gtk_cell_area_activate_cell (GtkCellArea *area,
|
||||
/* If the signal was successfully handled start the editing */
|
||||
if (gtk_widget_get_parent (GTK_WIDGET (editable_widget)))
|
||||
{
|
||||
gtk_cell_editable_start_editing (editable_widget, NULL);
|
||||
gtk_cell_editable_start_editing (editable_widget, event);
|
||||
gtk_widget_grab_focus (GTK_WIDGET (editable_widget));
|
||||
}
|
||||
else
|
||||
|
||||
+21
-28
@@ -53,7 +53,6 @@
|
||||
struct _GtkCheckMenuItemPrivate
|
||||
{
|
||||
guint active : 1;
|
||||
guint always_show_toggle : 1;
|
||||
guint draw_as_radio : 1;
|
||||
guint inconsistent : 1;
|
||||
};
|
||||
@@ -467,7 +466,6 @@ gtk_check_menu_item_init (GtkCheckMenuItem *check_menu_item)
|
||||
priv = check_menu_item->priv;
|
||||
|
||||
priv->active = FALSE;
|
||||
priv->always_show_toggle = TRUE;
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -556,34 +554,29 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
|
||||
|
||||
y = (allocation.height - indicator_size) / 2;
|
||||
|
||||
if (priv->active ||
|
||||
priv->always_show_toggle ||
|
||||
(state & GTK_STATE_FLAG_PRELIGHT))
|
||||
gtk_style_context_save (context);
|
||||
|
||||
if (priv->inconsistent)
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (priv->active)
|
||||
state |= GTK_STATE_FLAG_ACTIVE;
|
||||
|
||||
gtk_style_context_set_state (context, state);
|
||||
|
||||
if (priv->draw_as_radio)
|
||||
{
|
||||
gtk_style_context_save (context);
|
||||
|
||||
if (priv->inconsistent)
|
||||
state |= GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (priv->active)
|
||||
state |= GTK_STATE_FLAG_ACTIVE;
|
||||
|
||||
gtk_style_context_set_state (context, state);
|
||||
|
||||
if (priv->draw_as_radio)
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO);
|
||||
gtk_render_option (context, cr, x, y,
|
||||
indicator_size, indicator_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
|
||||
gtk_render_check (context, cr, x, y,
|
||||
indicator_size, indicator_size);
|
||||
}
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO);
|
||||
gtk_render_option (context, cr, x, y,
|
||||
indicator_size, indicator_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
|
||||
gtk_render_check (context, cr, x, y,
|
||||
indicator_size, indicator_size);
|
||||
}
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ static GtkClipboard *clipboard_peek (GdkDisplay *display,
|
||||
memset (&selection_data, 0, sizeof (GtkSelectionData));
|
||||
|
||||
selection_data.selection = clipboard->selection;
|
||||
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
|
||||
selection_data.target = gdk_quartz_pasteboard_type_to_atom_libgtk_only (type);
|
||||
selection_data.display = gdk_display_get_default ();
|
||||
selection_data.length = -1;
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ selected_cb (GtkButton *button,
|
||||
GtkDialog *dialog)
|
||||
{
|
||||
save_color (GTK_COLOR_CHOOSER_DIALOG (dialog));
|
||||
gtk_dialog_response (dialog, GTK_RESPONSE_OK);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -152,8 +151,7 @@ gtk_color_chooser_dialog_init (GtkColorChooserDialog *cc)
|
||||
G_CALLBACK (selected_cb), dialog);
|
||||
gtk_widget_set_can_default (priv->select_button, TRUE);
|
||||
gtk_widget_show (priv->select_button);
|
||||
gtk_box_pack_end (GTK_BOX (gtk_dialog_get_action_area (dialog)),
|
||||
priv->select_button, FALSE, TRUE, 0);
|
||||
gtk_dialog_add_action_widget (dialog, priv->select_button, GTK_RESPONSE_OK);
|
||||
gtk_widget_grab_default (priv->select_button);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (dialog,
|
||||
|
||||
@@ -3474,6 +3474,7 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
|
||||
gtk_cell_view_set_background_rgba (GTK_CELL_VIEW (priv->cell_view), &color);
|
||||
|
||||
priv->box = gtk_event_box_new ();
|
||||
gtk_widget_add_events (priv->box, GDK_SCROLL_MASK);
|
||||
gtk_event_box_set_visible_window (GTK_EVENT_BOX (priv->box),
|
||||
FALSE);
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
* The GtkComboBoxText implementation of the GtkBuildable interface
|
||||
* supports adding items directly using the <items> element
|
||||
* and specifying <item> elements for each item. Each <item>
|
||||
* element supports the regular translation attributes "translatable",
|
||||
* element can specify the "id" corresponding to the appended text and
|
||||
* also supports the regular translation attributes "translatable",
|
||||
* "context" and "comments".
|
||||
*
|
||||
* <example>
|
||||
@@ -66,9 +67,9 @@
|
||||
* <programlisting><![CDATA[
|
||||
* <object class="GtkComboBoxText">
|
||||
* <items>
|
||||
* <item translatable="yes">Factory</item>
|
||||
* <item translatable="yes">Home</item>
|
||||
* <item translatable="yes">Subway</item>
|
||||
* <item translatable="yes" id="factory">Factory</item>
|
||||
* <item translatable="yes" id="home">Home</item>
|
||||
* <item translatable="yes" id="subway">Subway</item>
|
||||
* </items>
|
||||
* </object>
|
||||
* ]]></programlisting>
|
||||
@@ -236,10 +237,6 @@ item_end_element (GMarkupParseContext *context,
|
||||
{
|
||||
gchar *translated;
|
||||
|
||||
/* FIXME: This will not use the domain set in the .ui file,
|
||||
* since the parser is not telling the builder about the domain.
|
||||
* However, it will work for gtk_builder_set_translation_domain() calls.
|
||||
*/
|
||||
translated = _gtk_builder_parser_translate (data->domain,
|
||||
data->context,
|
||||
data->string->str);
|
||||
|
||||
+17
-7
@@ -140,7 +140,8 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkStyleProviderPrivate *provider,
|
||||
GtkCssValue *current,
|
||||
GtkCssDependencies current_deps,
|
||||
GtkCssDependencies *dependencies)
|
||||
GtkCssDependencies *dependencies,
|
||||
GSList *cycle_list)
|
||||
{
|
||||
GtkCssDependencies unused;
|
||||
GtkCssValue *value;
|
||||
@@ -160,12 +161,20 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
case COLOR_TYPE_NAME:
|
||||
{
|
||||
GtkCssValue *named;
|
||||
GSList cycle = { color, cycle_list };
|
||||
|
||||
/* If color exists in cycle_list, we're currently resolving it.
|
||||
* So we've detected a cycle. */
|
||||
if (g_slist_find (cycle_list, color))
|
||||
return NULL;
|
||||
|
||||
named = _gtk_style_provider_private_get_color (provider, color->sym_col.name);
|
||||
if (named == NULL)
|
||||
return NULL;
|
||||
|
||||
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies);
|
||||
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies, &cycle);
|
||||
if (value == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -175,7 +184,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkHSLA hsla;
|
||||
GdkRGBA shade;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, current_deps, dependencies);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, current_deps, dependencies, cycle_list);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -197,7 +206,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GtkCssValue *val;
|
||||
GdkRGBA alpha;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, current_deps, dependencies);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, current_deps, dependencies, cycle_list);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -217,13 +226,13 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
|
||||
GdkRGBA color1, color2, res;
|
||||
GtkCssDependencies dep1, dep2;
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, current_deps, &dep1);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, current_deps, &dep1, cycle_list);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
color1 = *_gtk_css_rgba_value_get_rgba (val);
|
||||
_gtk_css_value_unref (val);
|
||||
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, current_deps, &dep2);
|
||||
val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, current_deps, &dep2, cycle_list);
|
||||
if (val == NULL)
|
||||
return NULL;
|
||||
color2 = *_gtk_css_rgba_value_get_rgba (val);
|
||||
@@ -322,7 +331,8 @@ gtk_css_value_color_compute (GtkCssValue *value,
|
||||
provider,
|
||||
current,
|
||||
current_deps,
|
||||
dependencies);
|
||||
dependencies,
|
||||
NULL);
|
||||
|
||||
if (resolved == NULL)
|
||||
return gtk_css_value_color_get_fallback (property_id, provider, values, parent_values);
|
||||
|
||||
@@ -47,7 +47,8 @@ GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue
|
||||
GtkStyleProviderPrivate *provider,
|
||||
GtkCssValue *current,
|
||||
GtkCssDependencies current_deps,
|
||||
GtkCssDependencies *dependencies);
|
||||
GtkCssDependencies *dependencies,
|
||||
GSList *cycle_list);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -471,6 +471,7 @@ gtk_css_image_linear_transition (GtkCssImage *start_image,
|
||||
start = GTK_CSS_IMAGE_LINEAR (start_image);
|
||||
|
||||
if (end_image == NULL)
|
||||
return GTK_CSS_IMAGE_CLASS (_gtk_css_image_linear_parent_class)->transition (start_image, end_image, property_id, progress);
|
||||
|
||||
if (!GTK_IS_CSS_IMAGE_LINEAR (end_image))
|
||||
return GTK_CSS_IMAGE_CLASS (_gtk_css_image_linear_parent_class)->transition (start_image, end_image, property_id, progress);
|
||||
|
||||
@@ -533,11 +533,15 @@
|
||||
* the GTK+ theming engine.
|
||||
* </para>
|
||||
* <para>
|
||||
* To set a shadow on an icon, use the icon-shadow property instead,
|
||||
* with the same syntax.
|
||||
* </para>
|
||||
* <para>
|
||||
* To set multiple shadows on an element, you can specify a comma-separated list
|
||||
* of shadow elements in the text-shadow property. Shadows are always rendered
|
||||
* front-back, i.e. the first shadow specified is on top of the others. Shadows
|
||||
* can thus overlay each other, but they can never overlay the text itself,
|
||||
* which is always rendered on top of the shadow layer.
|
||||
* of shadow elements in the text-shadow or icon-shadow property. Shadows are
|
||||
* always rendered front-back, i.e. the first shadow specified is on top of the
|
||||
* others. Shadows can thus overlay each other, but they can never overlay the
|
||||
* text or icon itself, which is always rendered on top of the shadow layer.
|
||||
* </para>
|
||||
* </refsect2>
|
||||
* <refsect2>
|
||||
|
||||
@@ -234,7 +234,8 @@ rgba_value_compute (GtkStyleProviderPrivate *provider,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
dependencies);
|
||||
dependencies,
|
||||
NULL);
|
||||
if (val != NULL)
|
||||
{
|
||||
rgba = *_gtk_css_rgba_value_get_rgba (val);
|
||||
@@ -323,7 +324,8 @@ color_value_compute (GtkStyleProviderPrivate *provider,
|
||||
provider,
|
||||
_gtk_css_computed_values_get_value (values, GTK_CSS_PROPERTY_COLOR),
|
||||
GTK_CSS_DEPENDS_ON_COLOR,
|
||||
dependencies);
|
||||
dependencies,
|
||||
NULL);
|
||||
if (val != NULL)
|
||||
{
|
||||
const GdkRGBA *rgba = _gtk_css_rgba_value_get_rgba (val);
|
||||
|
||||
@@ -476,7 +476,7 @@ bindings_value_parse_one (GtkCssParser *parser)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (g_ascii_strcasecmp (name, "none"))
|
||||
if (g_ascii_strcasecmp (name, "none") == 0)
|
||||
{
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
+10
-2
@@ -1254,7 +1254,11 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog,
|
||||
{
|
||||
/* reorder child with response_id to position */
|
||||
child = dialog_find_button (dialog, response_id);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
|
||||
if (child != NULL)
|
||||
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
|
||||
else
|
||||
g_warning ("%s : no child button with response id %d.", G_STRFUNC,
|
||||
response_id);
|
||||
|
||||
response_id = va_arg (args, gint);
|
||||
position++;
|
||||
@@ -1365,7 +1369,11 @@ gtk_dialog_set_alternative_button_order_from_array (GtkDialog *dialog,
|
||||
{
|
||||
/* reorder child with response_id to position */
|
||||
child = dialog_find_button (dialog, new_order[position]);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
|
||||
if (child != NULL)
|
||||
gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
|
||||
else
|
||||
g_warning ("%s : no child button with response id %d.", G_STRFUNC,
|
||||
new_order[position]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ struct _GtkDragFindData
|
||||
selection_data.selection = GDK_NONE;
|
||||
selection_data.data = NULL;
|
||||
selection_data.length = -1;
|
||||
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
|
||||
selection_data.target = gdk_quartz_pasteboard_type_to_atom_libgtk_only (type);
|
||||
selection_data.display = gdk_display_get_default ();
|
||||
|
||||
if (gtk_target_list_find (info->target_list,
|
||||
|
||||
@@ -3449,6 +3449,7 @@ gtk_drag_set_icon_surface (GdkDragContext *context,
|
||||
}
|
||||
|
||||
gdk_window_set_background_pattern (gtk_widget_get_window (window), pattern);
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
gtk_drag_set_icon_window (context, window, extents.x, extents.y, TRUE);
|
||||
}
|
||||
|
||||
+8
-3
@@ -1425,9 +1425,10 @@ gtk_entry_class_init (GtkEntryClass *class)
|
||||
PANGO_TYPE_ATTR_LIST,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
/** GtkEntry:populate-all:
|
||||
/**
|
||||
* GtkEntry:populate-all:
|
||||
*
|
||||
* If ::populate-all is %TRUE, the #GtkEntry::populate-popup
|
||||
* If :populate-all is %TRUE, the #GtkEntry::populate-popup
|
||||
* signal is also emitted for touch popups.
|
||||
*
|
||||
* Since: 3.8
|
||||
@@ -1507,7 +1508,7 @@ gtk_entry_class_init (GtkEntryClass *class)
|
||||
* to this signal and append your items to the @widget, which
|
||||
* will be a #GtkMenu in this case.
|
||||
*
|
||||
* If #GtkEntry::populate-all is %TRUE, this signal will
|
||||
* If #GtkEntry:populate-all is %TRUE, this signal will
|
||||
* also be emitted to populate touch popups. In this case,
|
||||
* @widget will be a different container, e.g. a #GtkToolbar.
|
||||
* The signal handler should not make assumptions about the
|
||||
@@ -5933,6 +5934,7 @@ gtk_entry_create_layout (GtkEntry *entry,
|
||||
attr->start_index = 0;
|
||||
attr->end_index = G_MAXINT;
|
||||
pango_attr_list_insert (tmp_attrs, attr);
|
||||
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
|
||||
}
|
||||
|
||||
if (preedit_length)
|
||||
@@ -6073,6 +6075,9 @@ draw_text_with_color (GtkEntry *entry,
|
||||
|
||||
get_layout_position (entry, &x, &y);
|
||||
|
||||
if (show_placeholder_text (entry))
|
||||
pango_layout_set_width (layout, PANGO_SCALE * gdk_window_get_width (entry->priv->text_area));
|
||||
|
||||
cairo_move_to (cr, x, y);
|
||||
gdk_cairo_set_source_rgba (cr, default_color);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
@@ -2686,6 +2686,8 @@ _gtk_entry_completion_disconnect (GtkEntryCompletion *completion)
|
||||
|
||||
unset_accessible_relation (completion->priv->popup_window,
|
||||
completion->priv->entry);
|
||||
gtk_window_set_attached_to (GTK_WINDOW (completion->priv->popup_window),
|
||||
NULL);
|
||||
|
||||
completion->priv->entry = NULL;
|
||||
}
|
||||
@@ -2698,6 +2700,8 @@ _gtk_entry_completion_connect (GtkEntryCompletion *completion,
|
||||
|
||||
set_accessible_relation (completion->priv->popup_window,
|
||||
completion->priv->entry);
|
||||
gtk_window_set_attached_to (GTK_WINDOW (completion->priv->popup_window),
|
||||
completion->priv->entry);
|
||||
|
||||
connect_completion_signals (completion);
|
||||
}
|
||||
|
||||
+2
-1
@@ -1043,7 +1043,8 @@ gtk_expander_button_release (GtkWidget *widget,
|
||||
|
||||
if (event->button == GDK_BUTTON_PRIMARY && expander->priv->button_down)
|
||||
{
|
||||
gtk_widget_activate (widget);
|
||||
if (expander->priv->prelight)
|
||||
gtk_widget_activate (widget);
|
||||
expander->priv->button_down = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2764,12 +2764,15 @@ static void
|
||||
combo_box_changed_cb (GtkComboBox *combo_box,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (user_data);
|
||||
GtkFileChooserButtonPrivate *priv = button->priv;
|
||||
GtkTreeIter iter;
|
||||
gboolean file_was_set;
|
||||
|
||||
file_was_set = FALSE;
|
||||
|
||||
if (gtk_combo_box_get_active_iter (combo_box, &iter))
|
||||
{
|
||||
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (user_data);
|
||||
GtkFileChooserButtonPrivate *priv = button->priv;
|
||||
gchar type;
|
||||
gpointer data;
|
||||
|
||||
@@ -2788,7 +2791,10 @@ combo_box_changed_cb (GtkComboBox *combo_box,
|
||||
case ROW_TYPE_BOOKMARK:
|
||||
case ROW_TYPE_CURRENT_FOLDER:
|
||||
if (data)
|
||||
gtk_file_chooser_button_select_file (GTK_FILE_CHOOSER (button), data, NULL);
|
||||
{
|
||||
gtk_file_chooser_button_select_file (GTK_FILE_CHOOSER (button), data, NULL);
|
||||
file_was_set = TRUE;
|
||||
}
|
||||
break;
|
||||
case ROW_TYPE_VOLUME:
|
||||
{
|
||||
@@ -2798,6 +2804,7 @@ combo_box_changed_cb (GtkComboBox *combo_box,
|
||||
if (base_file)
|
||||
{
|
||||
gtk_file_chooser_button_select_file (GTK_FILE_CHOOSER (button), base_file, NULL);
|
||||
file_was_set = TRUE;
|
||||
g_object_unref (base_file);
|
||||
}
|
||||
}
|
||||
@@ -2809,6 +2816,9 @@ combo_box_changed_cb (GtkComboBox *combo_box,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_was_set)
|
||||
g_signal_emit (button, file_chooser_button_signals[FILE_SET], 0);
|
||||
}
|
||||
|
||||
/* Calback for the "notify::popup-shown" signal on the combo box.
|
||||
|
||||
@@ -4112,11 +4112,11 @@ file_list_drag_motion_cb (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Sensitizes the "Copy file’s location" context menu item if there is actually
|
||||
/* Sensitizes the "Copy file’s location" and other context menu items if there is actually
|
||||
* a selection active.
|
||||
*/
|
||||
static void
|
||||
check_copy_file_location_sensitivity (GtkFileChooserDefault *impl)
|
||||
check_file_list_menu_sensitivity (GtkFileChooserDefault *impl)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
gboolean active;
|
||||
@@ -4129,6 +4129,10 @@ check_copy_file_location_sensitivity (GtkFileChooserDefault *impl)
|
||||
|
||||
if (impl->browse_files_popup_menu_copy_file_location_item)
|
||||
gtk_widget_set_sensitive (impl->browse_files_popup_menu_copy_file_location_item, active);
|
||||
if (impl->browse_files_popup_menu_add_shortcut_item)
|
||||
gtk_widget_set_sensitive (impl->browse_files_popup_menu_add_shortcut_item, active);
|
||||
if (impl->browse_files_popup_menu_visit_file_item)
|
||||
gtk_widget_set_sensitive (impl->browse_files_popup_menu_visit_file_item, active);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
@@ -4198,7 +4202,7 @@ file_list_build_popup_menu (GtkFileChooserDefault *impl)
|
||||
G_CALLBACK (show_size_column_toggled_cb));
|
||||
|
||||
bookmarks_check_add_sensitivity (impl);
|
||||
check_copy_file_location_sensitivity (impl);
|
||||
check_file_list_menu_sensitivity (impl);
|
||||
}
|
||||
|
||||
/* Updates the popup menu for the file list, creating it if necessary */
|
||||
@@ -10066,7 +10070,7 @@ list_selection_changed (GtkTreeSelection *selection,
|
||||
|
||||
check_preview_change (impl);
|
||||
bookmarks_check_add_sensitivity (impl);
|
||||
check_copy_file_location_sensitivity (impl);
|
||||
check_file_list_menu_sensitivity (impl);
|
||||
|
||||
g_signal_emit_by_name (impl, "selection-changed", 0);
|
||||
}
|
||||
|
||||
@@ -548,8 +548,12 @@ finished_loading_cb (GtkFileSystemModel *model,
|
||||
|
||||
completion = gtk_entry_get_completion (GTK_ENTRY (chooser_entry));
|
||||
update_inline_completion (chooser_entry);
|
||||
gtk_entry_completion_complete (completion);
|
||||
gtk_entry_completion_insert_prefix (completion);
|
||||
|
||||
if (gtk_widget_has_focus (GTK_WIDGET (chooser_entry)))
|
||||
{
|
||||
gtk_entry_completion_complete (completion);
|
||||
gtk_entry_completion_insert_prefix (completion);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user