summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication-wayland.c
Commit message (Collapse)AuthorAgeFilesLines
* gtk: Stop using g_sliceMatthias Clasen2023-03-141-2/+2
|
* gdk/wayland: Deprecate GdkDisplay windowing-specific for startup IDsCarlos Garnacho2023-02-021-0/+2
| | | | | | | | | | This is currently just used as a convenience storage of the startup ID between the GtkApplication and the GtkWindow (after it's ready to notify on it). This could be untangled in the GTK layers so there is no involvement from GDK in keeping the startup ID around, in the mean time just deprecate these gdk_wayland* API calls.
* wayland: Fix handling of activation-token in org.freedesktop.Application ↵Vlad Zahorodnii2023-01-271-1/+3
| | | | | | | | | | | | | | requests At the moment, GTK applications search for "desktop-startup-id" in the platform data on Wayland , but desktop environments such as plasma set "activation-token" property instead as indicated in the spec: activation-token: This should be a string of the same value as would be stored in the XDG_ACTIVATION_TOKEN environment variable, as specified by the XDG Activation protocol for Wayland. https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus
* wip: Split off GdkWaylandToplevelMatthias Clasen2023-01-061-0/+1
| | | | This still needs some more cleanup.
* wayland: avoid referencing unallocated memory when uninhibitingMichael Terry2020-12-061-1/+1
|
* Rename libgtk_only symbol in GdkWaylandToplevelEmmanuele Bassi2020-10-121-3/+7
| | | | All public non-exported symbols in GDK can be used by GTK.
* Move private GdkSurface Wayland API into its own headerEmmanuele Bassi2020-10-121-0/+1
| | | | | This allows us to hide private API from installed headers, documentation, and introspection.
* wayland: Change backend api to use GdkToplevelMatthias Clasen2020-09-191-7/+7
| | | | | | | | Most of the surface api we have in the Wayland backend only makes sense for toplevels, so reshuffle things to take a GdkToplevel instead of a GdkSurface. Update all callers and the docs.
* *: Fix spelling mistakes found by codespellBjörn Daase2020-08-211-1/+1
|
* Replace "gchar" with "char"Benjamin Otte2020-07-251-3/+3
|
* gtk/wayland: Add support for idle inhibition in GtkApplicationEmmanuel Gil Peyrot2020-07-141-1/+103
| | | | | | | | | | | | | | | | | | | | This feature was previously only supported on DBus compositors, such as Mutter, this adds support for other compositors such as all of those based on wlroots. This implementation prefers the idle-inhibit Wayland protocol to the DBus version if it is available, since the inhibitor is per-surface instead of global it allows a finer control over which displays get dimmed for instance. For every case not supported by this protocol, a fallback to the DBus version is used. It can’t do anything if the GtkWindow isn’t passed, which might warrant some documentation change to encourage users to not use NULL for this argument. This has been tested on Sway. Fixes #2202.
* Stop using gtk_widget_get_surfaceMatthias Clasen2019-05-281-1/+2
| | | | | Replace all uses of gtk_widget_get_surface by gtk_native_get_surface.
* GtkWidget: Start renaming widget->windowAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | This is an automated change doing these command: git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface git sed -f g gtk_widget_set_window gtk_widget_set_surface git sed -f g gtk_widget_get_window gtk_widget_get_surface git sed -f g gtk_widget_register_window gtk_widget_register_surface git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface git checkout NEWS*
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
* wayland: Set startup ID from GApplication platform dataFlorian Müllner2016-11-091-0/+13
| | | | | | | | | | The GApplication platform data may contain a startup ID that on X11 is used to set the startup notification ID when activated. Do the same on the wayland backend to make startup notifications work for DBus-activated applications where the DESKTOP_STARTUP_ID environment variable is not set. https://bugzilla.gnome.org/show_bug.cgi?id=768531
* wayland: Set a more correct xdg_surface application idJonas Ådahl2015-03-311-3/+8
| | | | | | | | | | | | | | | The "app_id" of a xdg_surface should be the ID that can potentially be used to get the DBUS name or the .desktop file. For GtkApplication programs this is often the ID passed when creating the GtkApplication object, so when available lets use that. As fallbacks, first try g_get_prgname as it often corresponds to the basename part of the .dektop file for non-GtkApplication programs. Otherwise use gdk_get_program_class, even though that string usually doesn't conform to the expectations of xdg_surface.set_application_id. https://bugzilla.gnome.org/show_bug.cgi?id=746435
* Refactor GtkApplicationRyan Lortie2013-12-161-0/+70
gtkapplication.c has turned into a bit of an #ifdef mess over time, and many of the current checks are incorrect. As an example, if you build Gtk for wayland, and exclude the X11 backend, much of the functionality required by wayland (such as exporting menu models) will be disabled. Solve that by introducing a backend mechanism to GtkApplication (named GtkApplicationImpl) similar to the one in GApplication. Add backends for Wayland, X11 and Quartz, with X11 and Wayland sharing a common 'DBus' superclass. GtkApplicationImpl | /--------------+-------------------\ | | GtkApplicationImplDBus GtkApplicationImplQuartz | /-----------+-----------------\ | | GtkApplicationImplX11 GtkApplicationImplWayland GtkApplicationImpl itself is essentially a bunch of vfuncs that serve as hooks for various things that the platform-specific backends may be interested in doing (startup, shutdown, managing windows, inhibit, etc.) With this change, all platform specific code has been removed from gtkapplication.c and gtkapplicationwindow.c (both of which are now free of #ifdefs, except for a UNIX-specific use of GDesktopAppInfo in gtkapplicationwindow.c). Additionally, because of the movement of the property-setting code out of GtkApplicationWindow, the _GTK_APPLICATION_ID properties (and friends) will be set on non-GtkApplicationWindows, such as dialogs. https://bugzilla.gnome.org/show_bug.cgi?id=720550