After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757984 - gtkimcontextsimple.c: Fix build on Windows
gtkimcontextsimple.c: Fix build on Windows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
3.19.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-11-12 12:10 UTC by Fan, Chun-wei
Modified: 2017-08-05 23:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkimcontextsimple.c: Build compose table code only on X11 and Wayland (1.78 KB, patch)
2015-11-12 12:24 UTC, Fan, Chun-wei
none Details | Review
gtkimcontextsimple.c: Don't use hardcoded X11_PREFIX on non-X11 and non-Wayland builds (2.90 KB, patch)
2015-11-13 03:53 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2015-11-12 12:10:55 UTC
Hi,

In an update to gtkimcontextsimple.c to support compose tables for X11/Wayland, builds for non-X11 platforms, specifically those that do not have X11_PREFIX, are broken as some of those code are built unconditionally.  I will attach a simple patch to ensure that those code are built only when on X11 or Wayland.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2015-11-12 12:24:00 UTC
Created attachment 315332 [details] [review]
gtkimcontextsimple.c: Build compose table code only on X11 and Wayland

Hi,

Here goes the patch...

With blessings, thank you!
Comment 2 Matthias Clasen 2015-11-12 14:00:38 UTC
Review of attachment 315332 [details] [review]:

I'm not sure I agree entirely. Having a way to do custom shortcuts via a gtk-3.0/Compose file is useful on all platforms. Of course, the X11-specific pieces need to be ifdefed
Comment 3 Fan, Chun-wei 2015-11-13 03:53:44 UTC
Created attachment 315385 [details] [review]
gtkimcontextsimple.c: Don't use hardcoded X11_PREFIX on non-X11 and non-Wayland builds

Hello Matthias,

(In reply to Matthias Clasen from comment #2)
> I'm not sure I agree entirely. Having a way to do custom shortcuts via a
> gtk-3.0/Compose file is useful on all platforms. Of course, the X11-specific
> pieces need to be ifdefed

Hmm, it does seem to me that the compose file items are run only when we are on Wayland or X11, as we check for the validity of the X11 or Wayland display (but not on the other display), so I would figure that the support for this on other platforms are either WIP or is not intended to be supported, but anyways...

Here's the patch that looks up the data path for the compose file dynamically when we are not on X11 nor Wayland.

With blessings, thank you!
Comment 4 Fan, Chun-wei 2015-11-13 03:56:02 UTC
(Sorry, the "on the other display" should read "on the other backends")
Comment 5 Matthias Clasen 2015-11-13 12:17:39 UTC
I had overlooked the code further down that only sets up the tables on X11 or Wayland. So, while I think that custom compose tables could be useful everywhere, we currently don't use them on other platforms.
Comment 6 Benjamin Otte (Company) 2015-11-16 00:37:46 UTC
This code is now compile-time dependant. If you run on OS X but compile with X support, you will get your Compose tables from X11_DATA_PREFIX, but if you build without X11 support, it's from g_get_datadir().
Same thing on Windows or with Wayland, though I don't think anyone builds Wayland support on Windows yet?

In any case: Is that intended?