Commit Graph

9 Commits

Author SHA1 Message Date
Frediano Ziglio
3892983eda Use visibility instead of just filtering using version script
In case version script support is not available we can still
able to filter symbols exported.
This for instance will work with linkers not supporting
--version-script (like system MacOS one).
Use new version macros similar to Glib to detect also
deprecated function.
Tested that exported symbols remains the same from both Linux
and Windows shared libraries.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-07-09 08:25:14 +01:00
Eduardo Lima (Etrunko)
46e1dc62fe Rename generated vncdisplaykeymap_*.c files to .h
Ninja parallel build fails in certain environments, so it is required
specify those files as a dependency so that vncdisplaykeymap.c will only
be built after all files it depends on are generated.

The problem is that, when using meson declare_dependency() function,
only header files should be used as the "sources" keyword, as documented
in http://mesonbuild.com/Wrap-best-practices-and-tips.html#declare-generated-headers-explicitly
and http://mesonbuild.com/Wrap-best-practices-and-tips.html#avoid-exposing-compilable-source-files-in-declare_dependency

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-08-28 15:37:51 -03:00
Victor Toso
d98a684fe6 gtk-deprecated: Use gdk_keymap_get_for_display()
As gdk_keymap_get_default() was deprecated in 3.22

Warnings fixed:
 | vncdisplaykeymap.c: In function ‘vnc_display_keyval_set_entries’:
 | vncdisplaykeymap.c:263:4: warning: ‘gdk_keymap_get_default’ is
 | deprecated: Use 'gdk_keymap_get_for_display' instead
 |
 |     gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(),
 |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 |
 | spice-gtk-session.c: In function ‘spice_gtk_session_init’:
 | spice-gtk-session.c:181:5: warning: ‘gdk_keymap_get_default’ is
 | deprecated: Use 'gdk_keymap_get_for_display' instead
 |
 |     GdkKeymap *keymap = gdk_keymap_get_default();
 |     ^~~~~~~~~
 |
 | spice-widget.c: In function ‘get_scancode_from_keyval’:
 | spice-widget.c:1731:5: warning: ‘gdk_keymap_get_default’ is
 | deprecated: Use 'gdk_keymap_get_for_display' instead
 |
 |      if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(),
 |      ^~

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-07-24 17:16:56 +02:00
Olivier Fourdan
28e3dc3442 Use scancode instead of keycode names
When running on Xwayland, the keycode mapping property is not available,
which causes unknown keycode mapping errors and the keyboard doesn't
work.

Check for a known scancode (“XK_Page_Up”) which differs to distinguish
between “xfree86” and “evdev” when the there is no keycode name.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-15 14:04:47 +01:00
Pavel Grunt
8b47fe9ef4 vncdisplaykeymap: Include missing headers
Causing build failures on win32
 .libs/vncdisplaykeymap.o: In function `vnc_display_keymap_gdk2xtkbd_table':
  /builddir/build/BUILD/spice-gtk-0.33.19-efbfd/build_win32/src/../../src/vncdisplaykeymap.c:198: undefined reference to `GDK_IS_WIN32_WINDOW'
 collect2: error: ld returned 1 exit status

Regression from 9ff67a108b
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-11-14 11:21:38 +01:00
Francois Gouget
9ff67a108b vncdisplaykeymap: Remove obsolete GTK+ 2 compatibility macros
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-10-31 17:13:30 +01:00
Marc-André Lureau
1cefbe59e7 vncdisplaykeymap: fix -Werror=tautological-compare
vncdisplaykeymap.c: In function 'vnc_display_keymap_gdk2xtkbd_table':
vncdisplaykeymap.c:223:14: error: self-comparison always evaluates to true [-Werror=tautological-compare]
  if (GDK_IS_WIN32_WINDOW(window)) {

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-06-20 17:12:35 +01:00
Marc-André Lureau
3390203021 widget: use allocation instead of window size
Since spice-gtk 57df040cc, the SpiceDisplay no longer forces its own
window. Get allocation instead of window size.  This fixes a "top
border" issue in spicy with gtk+ >= 3.19.8.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-03-23 17:18:43 +01:00
Marc-André Lureau
caf28401ca Move gtk/ -> src/
For historical reasons, the code was placed under gtk/ subdirectory.
If it was always bugging you, bug no more!
2015-06-08 17:38:58 +02:00