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
gdkcairocontext-x11.c
gdkcairocontext-x11.h
gdkclipboard-x11.c
gdkclipboard-x11.h
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
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
gdkeventsource.h
gdkeventtranslator.c
gdkeventtranslator.h
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
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
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
gdkselectioninputstream-x11.h
gdkselectionoutputstream-x11.c
gdkselectionoutputstream-x11.h
gdksettings.c
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
gdktextlistconverter-x11.h
gdkvulkancontext-x11.c
gdkvulkancontext-x11.h
gdkx11applaunchcontext.h
gdkx11device-xi2.h Move private GdkX11 symbols out of a public header 2020-12-15 13:46:50 +00:00
gdkx11device.h
gdkx11devicemanager-xi2.h
gdkx11devicemanager.h
gdkx11display.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkx11dnd.h
gdkx11glcontext.h x11: Add EGLDisplay getter 2021-05-11 12:42:16 +01:00
gdkx11monitor.h
gdkx11property.h
gdkx11screen.h
gdkx11selection.h
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
gdkx.h
gdkxftdefaults.c
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
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