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 672935 - Wayland readiness: Do not use gdk_x11_ API
Wayland readiness: Do not use gdk_x11_ API
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Libegg maintenance
Libegg maintenance
Depends on:
Blocks: wayland
 
 
Reported: 2012-03-27 15:59 UTC by André Klapper
Modified: 2013-07-28 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description André Klapper 2012-03-27 15:59:07 UTC
http://wayland.freedesktop.org/gtk.html says: 
"Your application must not use any API in the gdk_x11_ namespace or any raw Xlib calls."

Many applications still copy libegg code so this is probably the place to start. Please add dependencies bug report numbers to track progress in depending apps.

$:andre\> grep -r gdk_x11_ .
./libegg/smclient/eggsmclient-xsmp.c:
      gdk_x11_set_sm_client_id (xsmp->client_id);
./libegg/smclient/eggsmclient-dbus.c:
      gdk_x11_set_sm_client_id (ret_client_id);
./libegg/smclient/eggdesktopfile.c:
    launch_time = gdk_x11_display_get_user_time (display);
./libegg/smclient/eggdesktopfile.c:
  gdk_x11_display_broadcast_startup_message (display, "new",
./libegg/smclient/eggdesktopfile.c:
  gdk_x11_display_broadcast_startup_message (display, "remove",
./libegg/treeviewutils/eggaccelerators.c:
  xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
Comment 1 Christian Persch 2012-03-27 16:45:45 UTC
> "Your application must not use any API in the gdk_x11_ namespace or any raw
> Xlib calls."

That's not really correct. You just have to #ifdef GDK_WINDOWING_X11 these calls, *and* runtime-check with |if (GDK_IS_X11_DISPLAY(...)) { ... }| etc.
Comment 3 Thomas Andersen 2013-07-27 01:38:30 UTC
Looks like this was fixed in:
https://git.gnome.org/browse/libegg/commit/?id=7ceb9c1fb72f21f8887d25bbba1360b8ed56a0a7
Comment 4 Matthias Clasen 2013-07-28 20:16:42 UTC
true