_wayland dragging good
This commit is contained in:
@@ -144,8 +144,8 @@ SDLWindow::SDLWindow(const CreateWindowSettings& settings)
|
||||
flags |= SDL_WINDOW_TRANSPARENT;
|
||||
|
||||
// Disable parenting of child windows as those are always on top of the parent window and never show up in taskbar
|
||||
//if (_settings.Parent != nullptr && (_settings.Type != WindowType::Tooltip && _settings.Type != WindowType::Popup))
|
||||
// _settings.Parent = nullptr;
|
||||
if (_settings.Parent != nullptr && (_settings.Type != WindowType::Tooltip && _settings.Type != WindowType::Popup))
|
||||
_settings.Parent = nullptr;
|
||||
|
||||
if (_settings.Parent != nullptr && _settings.Parent->_settings.Type != WindowType::Regular && (_settings.Type == WindowType::Tooltip || _settings.Type == WindowType::Popup))
|
||||
{
|
||||
@@ -406,7 +406,7 @@ SDLWindow* SDLWindow::GetWindowWithSDLWindow(SDL_Window* window)
|
||||
|
||||
void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
{
|
||||
if (_isClosing)
|
||||
if (_isClosing || waylandDraggingActive)
|
||||
return;
|
||||
|
||||
switch (event.type)
|
||||
@@ -792,10 +792,10 @@ void SDLWindow::Show()
|
||||
}
|
||||
|
||||
SDL_ShowWindow(_window);
|
||||
if (_settings.AllowInput && _settings.ActivateWhenFirstShown)
|
||||
/*if (_settings.AllowInput && _settings.ActivateWhenFirstShown)
|
||||
Focus();
|
||||
else if (_settings.Parent == nullptr)
|
||||
BringToFront();
|
||||
BringToFront();*/
|
||||
|
||||
// Reused top-most windows (DockHintWindow) doesn't stay on top for some reason
|
||||
if (_settings.IsTopmost && _settings.Type != WindowType::Tooltip)
|
||||
@@ -925,10 +925,10 @@ bool SDLWindow::IsForegroundWindow() const
|
||||
|
||||
void SDLWindow::BringToFront(bool force)
|
||||
{
|
||||
auto activateWhenRaised = SDL_GetHint(SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED);
|
||||
/*auto activateWhenRaised = SDL_GetHint(SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED);
|
||||
SDL_SetHint(SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED, "0");
|
||||
SDL_RaiseWindow(_window);
|
||||
SDL_SetHint(SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED, activateWhenRaised);
|
||||
SDL_SetHint(SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED, activateWhenRaised);*/
|
||||
}
|
||||
|
||||
void SDLWindow::SetClientBounds(const Rectangle& clientArea)
|
||||
@@ -1108,7 +1108,7 @@ String SDLWindow::GetTitle() const
|
||||
|
||||
void SDLWindow::SetTitle(const StringView& title)
|
||||
{
|
||||
SDL_SetWindowTitle(_window, title.ToStringAnsi().Get());
|
||||
//SDL_SetWindowTitle(_window, title.ToStringAnsi().Get());
|
||||
}
|
||||
|
||||
void SDLWindow::StartTrackingMouse(bool useMouseScreenOffset)
|
||||
@@ -1303,7 +1303,7 @@ void SDLWindow::StartDragging(const Float2& offset)
|
||||
{
|
||||
LOG(Info, "StartDragging {}", offset);
|
||||
|
||||
DoDragDropWayland(String("awindow"));
|
||||
DoDragDropWayland(String("notawindow"));
|
||||
/*
|
||||
_dragOver = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user