gtk2/gdk/x11
Vincent Bernat 2ebde276d1 x11: ensure WM class is not null even if display is initialized early
With gtkmm, when using `Application()`, the display is initialized
before we know the application name and therefore, the program class
associated to the display is NULL.

Instead of providing a default value, we set it equal to program name
when NULL. Moreover, we give up on capitalizing the class name to keep
the code super simple. Also, not using a capitalized name is
consistent with `gdk_x11_display_open()`. If someone has a good reason
to use a capitalized name, here is how to do it.

```c
  class_hint = XAllocClassHint ();
  class_hint->res_name = (char *) g_get_prgname ();
  if (display_x11->program_class)
    {
      class_hint->res_class = (char *) g_strdup (display_x11->program_class);
    }
  else if (class_hint->res_name && class_hint->res_name[0])
    {
      class_hint->res_class = (char *) g_strdup (class_hint->res_name);
      class_hint->res_class[0] = g_ascii_toupper (class_hint->res_class[0]);
    }
  XSetClassHint (xdisplay, impl->xid, class_hint);
  g_free (class_hint->res_class);
  XFree (class_hint);
```

Fix eff53c023a ("x11: set a default value for program_class")
2021-08-10 09:14:36 +02:00
..
gdkapplaunchcontext-x11.c Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdkasync.c Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdkasync.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkcairocontext-x11.c Get rid of GdkSurfaceImpl 2019-05-28 20:25:14 +00:00
gdkcairocontext-x11.h x11: Move implementation of Cairo context backends 2018-04-24 23:16:13 +02:00
gdkclipboard-x11.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkclipboard-x11.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkcursor-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevice-xi2-private.h Move private GdkX11 symbols out of a public header 2020-12-15 13:46:50 +00:00
gdkdevice-xi2.c x11: Move from g_memdup() to g_memdup2() 2021-02-11 14:22:22 +00:00
gdkdevicemanager-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicemanager-xi2.c seat: improve api to take into account the tool type 2021-01-07 12:50:48 +01:00
gdkdevicemanagerprivate-core.h GdkWindow -> GdkSurface initial type rename 2018-03-20 11:40:08 +01:00
gdkdisplay-x11.c x11: ensure WM class is not null even if display is initialized early 2021-08-10 09:14:36 +02:00
gdkdisplay-x11.h gl: Require EGL_KHR_surfaceless_context with egl 2021-07-22 16:27:31 +02:00
gdkdrag-x11.c Avoid copying static debug strings 2021-07-28 22:42:46 -04:00
gdkdrop-x11.c x11: Remove unused headers 2021-07-20 14:00:25 -04:00
gdkeventsource.c gdk: Conflate GDK devices 2020-07-29 01:27:51 +02:00
gdkeventsource.h x11: Refactor xevent filtering some more 2017-12-13 01:55:56 +01:00
gdkeventtranslator.c x11: change event translator interface 2020-02-21 00:47:51 -05:00
gdkeventtranslator.h gdk: Drop the GdkEventMask enum 2020-05-26 19:39:31 -04:00
gdkglcontext-egl.c gl: Fix issue with EGL + nvidia 2021-07-22 16:28:16 +02:00
gdkglcontext-glx.c glx: Get rid fo DrawableInfo 2021-07-22 16:28:16 +02:00
gdkglcontext-x11.c display: Move GL selection code into gdkdisplay-x11.c 2021-07-22 16:28:16 +02:00
gdkglcontext-x11.h display: Move GL selection code into gdkdisplay-x11.c 2021-07-22 16:28:16 +02:00
gdkkeys-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkkeys-x11.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkmain-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkmonitor-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkmonitor-x11.h x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkprivate-x11.h x11: Move code where it belongs 2021-07-22 16:06:05 +02:00
gdkproperty-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkscreen-x11.c x11: Remove GdkVisual 2021-07-22 16:06:06 +02:00
gdkscreen-x11.h x11: Remove GdkVisual 2021-07-22 16:06:06 +02:00
gdkselection-x11.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkselectioninputstream-x11.c Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkselectioninputstream-x11.h x11: Improve fallbacks for text 2017-12-03 05:46:46 +01:00
gdkselectionoutputstream-x11.c Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkselectionoutputstream-x11.h x11: Refactor code 2017-12-13 00:56:52 +01:00
gdksettings.c Add a gtk-overlay-scrolling setting 2019-05-31 14:07:15 +00:00
gdksurface-x11.c x11: ensure WM class is not null even if display is initialized early 2021-08-10 09:14:36 +02:00
gdksurface-x11.h glx: Get rid fo DrawableInfo 2021-07-22 16:28:16 +02:00
gdktextlistconverter-x11.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdktextlistconverter-x11.h x11: Implement claiming the X Selection with the clipboard 2017-12-03 05:46:47 +01:00
gdkvulkancontext-x11.c Fix minor typos 2020-05-28 11:00:03 +03:00
gdkvulkancontext-x11.h The big versioning cleanup 2018-02-06 01:16:32 -05:00
gdkx11applaunchcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11device-xi2.h Move private GdkX11 symbols out of a public header 2020-12-15 13:46:50 +00:00
gdkx11device.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkx11devicemanager-xi2.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11devicemanager.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkx11display.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkx11dnd.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11glcontext.h x11: Add EGLDisplay getter 2021-05-11 12:42:16 +01:00
gdkx11monitor.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkx11property.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkx11screen.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkx11selection.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkx11surface.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkx11utils.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkx-autocleanups.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdkx.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdkxftdefaults.c Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
gdkxid.c Documentation fixes 2021-05-20 19:17:49 -04:00
meson.build x11: Remove GdkVisual 2021-07-22 16:06:06 +02:00
MwmUtil.h Change FSF Address 2012-02-27 17:06:11 +00:00
xsettings-client.c gdk: fix gtk app startup with 'g_value_set_boxed: assertion G_VALUE_HOLDS_BOXED (value) failed error message' when xsettings use 'XSETTINGS_TYPE_COLOR' type 2021-07-02 17:23:56 +08:00
xsettings-client.h x11: Don't pass a GdkEvent to xsettings filters 2020-02-21 00:40:52 -05:00