_fix windows compilation
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Platform/Base/DragDropHelper.h"
|
||||
#include "Engine/Platform/Unix/UnixFile.h"
|
||||
|
||||
#include "wayland/xdg-toplevel-drag-v1.h"
|
||||
#include <wayland/xdg-shell.h>
|
||||
#include <wayland/xdg-shell.h>
|
||||
#if PLATFORM_SDL && PLATFORM_LINUX
|
||||
|
||||
#include "Engine/Platform/Platform.h"
|
||||
@@ -26,12 +16,18 @@
|
||||
#include "Engine/Platform/Linux/IncludeX11.h"
|
||||
#include "Engine/Input/Input.h"
|
||||
#include "Engine/Input/Mouse.h"
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Platform/Base/DragDropHelper.h"
|
||||
#include "Engine/Platform/Unix/UnixFile.h"
|
||||
|
||||
#include <SDL3/SDL_video.h>
|
||||
#include <SDL3/SDL_system.h>
|
||||
#include <SDL3/SDL_hints.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <wayland/xdg-toplevel-drag-v1.h>
|
||||
#include <wayland/xdg-shell.h>
|
||||
|
||||
// Wayland
|
||||
void WaylandRegistryGlobal(void* data, wl_registry *registry, uint32 id, const char* interface, uint32 version);
|
||||
@@ -1589,10 +1585,6 @@ bool SDLPlatform::InitPlatformX11(void* display)
|
||||
return false;
|
||||
}
|
||||
|
||||
void SDLPlatform::Exit()
|
||||
{
|
||||
}
|
||||
|
||||
void* SDLPlatform::GetXDisplay()
|
||||
{
|
||||
return xDisplay;
|
||||
|
||||
@@ -65,7 +65,6 @@ public:
|
||||
|
||||
// [PlatformBase]
|
||||
static bool Init();
|
||||
static void Exit();
|
||||
static void LogInfo();
|
||||
static void Tick();
|
||||
static void SetHighDpiAwarenessEnabled(bool enable);
|
||||
|
||||
@@ -308,7 +308,9 @@ SDLWindow::~SDLWindow()
|
||||
if (_window == nullptr)
|
||||
return;
|
||||
|
||||
#if PLATFORM_LINUX
|
||||
SurfaceToWindowMap.RemoveValue(this);
|
||||
#endif
|
||||
SDL_StopTextInput(_window);
|
||||
SDL_DestroyWindow(_window);
|
||||
|
||||
@@ -824,8 +826,10 @@ void SDLWindow::Hide()
|
||||
|
||||
SDL_HideWindow(_window);
|
||||
|
||||
#if PLATFORM_LINUX
|
||||
if (SDLPlatform::UsesWayland() && _dragOver)
|
||||
StopDragging();
|
||||
#endif
|
||||
|
||||
WindowBase::Hide();
|
||||
}
|
||||
@@ -1321,8 +1325,11 @@ void SDLWindow::StartDragging(const Float2& offset, Window* dragSourceWindow)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_LINUX
|
||||
SetOpacity(0.1f);
|
||||
DoDragDropWayland(String("notawindow"), dragSourceWindow, dragOffset);
|
||||
if (SDLPlatform::UsesWayland()
|
||||
DoDragDropWayland(String("notawindow"), dragSourceWindow, dragOffset);
|
||||
#endif
|
||||
/*
|
||||
_dragOver = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user