1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

WindowServer: Remove nudge_into_desktop() from Window

Positioning windows outside visible coordinates is valid if sometimes
curious behavior, but it shouldn't be considered misbehavior by default.
There are multiple ways to recover windows with obscured title bars,
and this function papers over actual resize bugs and is no longer
needed to normalize window size, so let's remove it for now.
This commit is contained in:
thankyouverycool 2022-08-17 19:43:52 -04:00 committed by Andreas Kling
parent b180132c87
commit a1dceb5b97
4 changed files with 0 additions and 55 deletions

View file

@ -835,11 +835,6 @@ bool WindowManager::process_ongoing_window_move(MouseEvent& event)
} else if (!m_move_window->is_tiled()) {
Gfx::IntPoint pos = m_move_window_origin.translated(event.position() - m_move_origin);
m_move_window->set_position_without_repaint(pos);
// "Bounce back" the window if it would end up too far outside the screen.
// If the user has let go of Mod_Super, maybe they didn't intentionally press it to begin with.
// Therefore, refuse to go into a state where knowledge about super-drags is necessary.
bool force_titlebar_visible = !(m_keyboard_modifiers & Mod_Super);
m_move_window->nudge_into_desktop(&cursor_screen, force_titlebar_visible);
} else if (pixels_moved_from_start > 5) {
Gfx::IntPoint adjusted_position = event.position().translated(-m_move_window_cursor_position);
m_move_window->set_untiled();