mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 14:07:42 +00:00
WindowServer: Allow moving the Launcher window type.
This commit is contained in:
parent
ecb1b93d53
commit
b36108dc3c
2 changed files with 6 additions and 1 deletions
|
@ -42,6 +42,11 @@ public:
|
||||||
bool show_titlebar() const { return m_show_titlebar; }
|
bool show_titlebar() const { return m_show_titlebar; }
|
||||||
void set_show_titlebar(bool show) { m_show_titlebar = show; }
|
void set_show_titlebar(bool show) { m_show_titlebar = show; }
|
||||||
|
|
||||||
|
bool is_movable() const
|
||||||
|
{
|
||||||
|
return m_type == WSWindowType::Normal || m_type == WSWindowType::Launcher;
|
||||||
|
}
|
||||||
|
|
||||||
WSWindowFrame& frame() { return m_frame; }
|
WSWindowFrame& frame() { return m_frame; }
|
||||||
const WSWindowFrame& frame() const { return m_frame; }
|
const WSWindowFrame& frame() const { return m_frame; }
|
||||||
|
|
||||||
|
|
|
@ -731,7 +731,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovere
|
||||||
|
|
||||||
// First check if we should initiate a drag or resize (Logo+LMB or Logo+RMB).
|
// First check if we should initiate a drag or resize (Logo+LMB or Logo+RMB).
|
||||||
// In those cases, the event is swallowed by the window manager.
|
// In those cases, the event is swallowed by the window manager.
|
||||||
if (window.type() == WSWindowType::Normal) {
|
if (window.is_movable()) {
|
||||||
if (!window.is_fullscreen() && m_keyboard_modifiers == Mod_Logo && event.type() == WSEvent::MouseDown && event.button() == MouseButton::Left) {
|
if (!window.is_fullscreen() && m_keyboard_modifiers == Mod_Logo && event.type() == WSEvent::MouseDown && event.button() == MouseButton::Left) {
|
||||||
hovered_window = &window;
|
hovered_window = &window;
|
||||||
start_window_drag(window, event);
|
start_window_drag(window, event);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue