Skip to content

Commit

Permalink
added some logs for exported window
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Apr 24, 2024
1 parent 1533d66 commit 9e05744
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/video/wayland/SDL_waylandevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,15 @@ static void pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_
case BTN_EXTRA:
sdl_button = SDL_BUTTON_X2;
break;
case BTN_FORWARD:
sdl_button = SDL_BUTTON_X2 + 1;
break;
case BTN_BACK:
sdl_button = SDL_BUTTON_X2 + 2;
break;
case BTN_TASK:
sdl_button = SDL_BUTTON_X2 + 3;
break;
default:
return;
}
Expand Down
11 changes: 8 additions & 3 deletions src/video/wayland/SDL_waylandwebos_foreign.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#ifdef SDL_VIDEO_DRIVER_WAYLAND_WEBOS

#include "../../events/SDL_events_c.h"
#include "../SDL_sysvideo.h"
#include "SDL_hints.h"
#include "SDL_timer.h"
Expand Down Expand Up @@ -98,7 +97,7 @@ const char *WaylandWebOS_CreateExportedWindow(_THIS, SDL_webOSExportedWindowType
SDL_Delay(10);
WAYLAND_wl_display_dispatch(data->display);
}
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Created exported window %s", foreign_window->window_id);
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "Created exported window %s", foreign_window->window_id);
SDL_UnlockMutex(_this->webos_foreign_lock);
return foreign_window->window_id;
}
Expand Down Expand Up @@ -241,9 +240,15 @@ SDL_bool WaylandWebOS_ExportedSetProperty(_THIS, const char *windowId, const cha
void WaylandWebOS_DestroyExportedWindow(_THIS, const char *windowId)
{
SDL_VideoData *data = _this->driverdata;
if (data == NULL || windowId == NULL) {
if (windowId == NULL) {
SDL_SetError("Failed destroying exported window: Invalid window id");
return;
}
if (data == NULL) {
SDL_SetError("Failed destroying exported window: No video driver data for video device");
return;
}
SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "Destroying exported window %s", windowId);
SDL_LockMutex(_this->webos_foreign_lock);
if (data->webos_foreign_table->count != 0) {
webos_foreign_window *prev = NULL;
Expand Down

0 comments on commit 9e05744

Please sign in to comment.