Change from wlr to hyprland so dbus would recognize different implementation

This commit is contained in:
Leftas 2022-12-04 19:57:30 +02:00
parent 3d3c5a4200
commit 607ce73671
No known key found for this signature in database
GPG key ID: 68981317EB17192D
3 changed files with 7 additions and 7 deletions

View file

@ -111,7 +111,7 @@ static char *config_path(const char *prefix, const char *filename) {
return NULL; return NULL;
} }
char *config_folder = "xdg-desktop-portal-wlr"; char *config_folder = "xdg-desktop-portal-hyprland";
size_t size = 3 + strlen(prefix) + strlen(config_folder) + strlen(filename); size_t size = 3 + strlen(prefix) + strlen(config_folder) + strlen(filename);
char *path = calloc(size, sizeof(char)); char *path = calloc(size, sizeof(char));

View file

@ -18,16 +18,16 @@ enum event_loop_fd {
EVENT_LOOP_TIMER, EVENT_LOOP_TIMER,
}; };
static const char service_name[] = "org.freedesktop.impl.portal.desktop.wlr"; static const char service_name[] = "org.freedesktop.impl.portal.desktop.hyprland";
static int xdpw_usage(FILE *stream, int rc) { static int xdpw_usage(FILE *stream, int rc) {
static const char *usage = static const char *usage =
"Usage: xdg-desktop-portal-wlr [options]\n" "Usage: xdg-desktop-portal-hyprland [options]\n"
"\n" "\n"
" -l, --loglevel=<loglevel> Select log level (default is ERROR).\n" " -l, --loglevel=<loglevel> Select log level (default is ERROR).\n"
" QUIET, ERROR, WARN, INFO, DEBUG, TRACE\n" " QUIET, ERROR, WARN, INFO, DEBUG, TRACE\n"
" -c, --config=<config file> Select config file.\n" " -c, --config=<config file> Select config file.\n"
" (default is $XDG_CONFIG_HOME/xdg-desktop-portal-wlr/config)\n" " (default is $XDG_CONFIG_HOME/xdg-desktop-portal-hyprland/config)\n"
" -r, --replace Replace a running instance.\n" " -r, --replace Replace a running instance.\n"
" -h, --help Get help (this text).\n" " -h, --help Get help (this text).\n"
"\n"; "\n";

View file

@ -275,7 +275,7 @@ enum wl_shm_format xdpw_format_wl_shm_from_drm_fourcc(uint32_t format) {
case DRM_FORMAT_BGRA1010102: case DRM_FORMAT_BGRA1010102:
return (enum wl_shm_format)format; return (enum wl_shm_format)format;
default: default:
logprint(ERROR, "xdg-desktop-portal-wlr: unsupported drm " logprint(ERROR, "xdg-desktop-portal-hyprland: unsupported drm "
"format 0x%08x", format); "format 0x%08x", format);
abort(); abort();
} }
@ -304,7 +304,7 @@ uint32_t xdpw_format_drm_fourcc_from_wl_shm(enum wl_shm_format format) {
case WL_SHM_FORMAT_BGRA1010102: case WL_SHM_FORMAT_BGRA1010102:
return (uint32_t)format; return (uint32_t)format;
default: default:
logprint(ERROR, "xdg-desktop-portal-wlr: unsupported wl_shm " logprint(ERROR, "xdg-desktop-portal-hyprland: unsupported wl_shm "
"format 0x%08x", format); "format 0x%08x", format);
abort(); abort();
} }
@ -347,7 +347,7 @@ enum spa_video_format xdpw_format_pw_from_drm_fourcc(uint32_t format) {
case DRM_FORMAT_BGRA1010102: case DRM_FORMAT_BGRA1010102:
return SPA_VIDEO_FORMAT_BGRA_102LE; return SPA_VIDEO_FORMAT_BGRA_102LE;
default: default:
logprint(ERROR, "xdg-desktop-portal-wlr: failed to convert drm " logprint(ERROR, "xdg-desktop-portal-hyprland: failed to convert drm "
"format 0x%08x to spa_video_format", format); "format 0x%08x to spa_video_format", format);
abort(); abort();
} }