Skip to content

Commit

Permalink
Fix various things after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Riteo committed Sep 9, 2024
1 parent 243a5bf commit a8d1c2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions platform/linuxbsd/freedesktop_portal_desktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ bool FreeDesktopPortalDesktop::indicator_register(DisplayServer::IndicatorID p_i
return true;
}

bool FreeDesktopPortalDesktop::indicator_create(DisplayServer::IndicatorID p_id, const Ref<Image> &p_icon) {
bool FreeDesktopPortalDesktop::indicator_create(DisplayServer::IndicatorID p_id, const Ref<Texture2D> &p_icon) {
MutexLock mutex_lock(dbus_mutex);

ERR_FAIL_COND_V(indicators.has(p_id), false);
Expand Down Expand Up @@ -992,7 +992,7 @@ bool FreeDesktopPortalDesktop::indicator_create(DisplayServer::IndicatorID p_id,
return true;
}

Error FreeDesktopPortalDesktop::indicator_set_icon(DisplayServer::IndicatorID p_id, const Ref<Image> &p_icon) {
Error FreeDesktopPortalDesktop::indicator_set_icon(DisplayServer::IndicatorID p_id, const Ref<Texture2D> &p_icon) {
MutexLock mutex_lock(dbus_mutex);

ERR_FAIL_COND_V(!indicators.has(p_id), ERR_UNCONFIGURED);
Expand All @@ -1001,9 +1001,9 @@ Error FreeDesktopPortalDesktop::indicator_set_icon(DisplayServer::IndicatorID p_
ERR_FAIL_COND_V(p_icon.is_null(), FAILED);

// We'll have to manipulate the icon a bit.
Ref<Image> image = p_icon->duplicate(true);
Ref<Image> image = p_icon->get_image();

if (p_icon->is_compressed()) {
if (image->is_compressed()) {
Error err = image->decompress();
ERR_FAIL_COND_V_MSG(err != OK, err, "Couldn't decompress VRAM-compressed status-icon. Switch to a lossless compression mode in the Import dock.");
}
Expand Down
7 changes: 3 additions & 4 deletions platform/linuxbsd/freedesktop_portal_desktop.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

#ifdef DBUS_ENABLED

#include "core/io/image.h"
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
#include "scene/resources/texture.h"
#include "servers/display_server.h"

#ifdef SOWRAP_ENABLED
Expand Down Expand Up @@ -68,7 +68,6 @@ class FreeDesktopPortalDesktop : public Object {
bool opt_in_cb = false;
};


struct FileDialogCallback {
Callable callback;
Variant status;
Expand Down Expand Up @@ -156,8 +155,8 @@ class FreeDesktopPortalDesktop : public Object {
}

bool indicator_register(DisplayServer::IndicatorID p_id);
bool indicator_create(DisplayServer::IndicatorID p_id, const Ref<Image> &p_icon);
Error indicator_set_icon(DisplayServer::IndicatorID p_id, const Ref<Image> &p_icon);
bool indicator_create(DisplayServer::IndicatorID p_id, const Ref<Texture2D> &p_icon);
Error indicator_set_icon(DisplayServer::IndicatorID p_id, const Ref<Texture2D> &p_icon);
void indicator_set_tooltip(DisplayServer::IndicatorID p_id, const String &p_tooltip);
void indicator_set_callback(DisplayServer::IndicatorID p_id, const Callable &p_callback);
void indicator_destroy(DisplayServer::IndicatorID p_id);
Expand Down
1 change: 1 addition & 0 deletions platform/linuxbsd/wayland/display_server_wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ bool DisplayServerWayland::has_feature(Feature p_feature) const {
case FEATURE_WINDOW_TRANSPARENCY:
case FEATURE_HIDPI:
case FEATURE_SWAP_BUFFERS:
case FEATURE_STATUS_INDICATOR:
case FEATURE_KEEP_SCREEN_ON:
case FEATURE_IME:
case FEATURE_CLIPBOARD_PRIMARY: {
Expand Down

0 comments on commit a8d1c2e

Please sign in to comment.