mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
Everywhere: Replace "virtual desktop" => "workspace"
This commit is contained in:
parent
8417c0fb1e
commit
d21dc1f451
27 changed files with 103 additions and 103 deletions
|
@ -26,7 +26,7 @@ Desktop::Desktop()
|
|||
{
|
||||
}
|
||||
|
||||
void Desktop::did_receive_screen_rects(Badge<WindowServerConnection>, const Vector<Gfx::IntRect, 4>& rects, size_t main_screen_index, unsigned virtual_desktop_rows, unsigned virtual_desktop_columns)
|
||||
void Desktop::did_receive_screen_rects(Badge<WindowServerConnection>, const Vector<Gfx::IntRect, 4>& rects, size_t main_screen_index, unsigned workspace_rows, unsigned workspace_columns)
|
||||
{
|
||||
m_main_screen_index = main_screen_index;
|
||||
m_rects = rects;
|
||||
|
@ -38,8 +38,8 @@ void Desktop::did_receive_screen_rects(Badge<WindowServerConnection>, const Vect
|
|||
m_bounding_rect = {};
|
||||
}
|
||||
|
||||
m_virtual_desktop_rows = virtual_desktop_rows;
|
||||
m_virtual_desktop_columns = virtual_desktop_columns;
|
||||
m_workspace_rows = workspace_rows;
|
||||
m_workspace_columns = workspace_columns;
|
||||
|
||||
for (auto& callback : m_receive_rects_callbacks)
|
||||
callback(*this);
|
||||
|
|
|
@ -36,8 +36,8 @@ public:
|
|||
const Vector<Gfx::IntRect, 4>& rects() const { return m_rects; }
|
||||
size_t main_screen_index() const { return m_main_screen_index; }
|
||||
|
||||
unsigned virtual_desktop_rows() const { return m_virtual_desktop_rows; }
|
||||
unsigned virtual_desktop_columns() const { return m_virtual_desktop_columns; }
|
||||
unsigned workspace_rows() const { return m_workspace_rows; }
|
||||
unsigned workspace_columns() const { return m_workspace_columns; }
|
||||
|
||||
int taskbar_height() const { return TaskbarWindow::taskbar_height(); }
|
||||
|
||||
|
@ -53,8 +53,8 @@ private:
|
|||
Vector<Gfx::IntRect, default_screen_rect_count> m_rects;
|
||||
size_t m_main_screen_index { 0 };
|
||||
Gfx::IntRect m_bounding_rect;
|
||||
unsigned m_virtual_desktop_rows { 1 };
|
||||
unsigned m_virtual_desktop_columns { 1 };
|
||||
unsigned m_workspace_rows { 1 };
|
||||
unsigned m_workspace_columns { 1 };
|
||||
Vector<Function<void(Desktop&)>> m_receive_rects_callbacks;
|
||||
};
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
WM_AppletAreaSizeChanged,
|
||||
WM_SuperKeyPressed,
|
||||
WM_SuperSpaceKeyPressed,
|
||||
WM_VirtualDesktopChanged,
|
||||
WM_WorkspaceChanged,
|
||||
__End_WM_Events,
|
||||
};
|
||||
|
||||
|
@ -138,15 +138,15 @@ public:
|
|||
|
||||
class WMWindowStateChangedEvent : public WMEvent {
|
||||
public:
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, StringView title, const Gfx::IntRect& rect, unsigned virtual_desktop_row, unsigned virtual_desktop_column, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress)
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, StringView title, const Gfx::IntRect& rect, unsigned workspace_row, unsigned workspace_column, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress)
|
||||
: WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id)
|
||||
, m_parent_client_id(parent_client_id)
|
||||
, m_parent_window_id(parent_window_id)
|
||||
, m_title(title)
|
||||
, m_rect(rect)
|
||||
, m_window_type(window_type)
|
||||
, m_virtual_desktop_row(virtual_desktop_row)
|
||||
, m_virtual_desktop_column(virtual_desktop_column)
|
||||
, m_workspace_row(workspace_row)
|
||||
, m_workspace_column(workspace_column)
|
||||
, m_active(is_active)
|
||||
, m_modal(is_modal)
|
||||
, m_minimized(is_minimized)
|
||||
|
@ -165,8 +165,8 @@ public:
|
|||
bool is_minimized() const { return m_minimized; }
|
||||
bool is_frameless() const { return m_frameless; }
|
||||
Optional<int> progress() const { return m_progress; }
|
||||
unsigned virtual_desktop_row() const { return m_virtual_desktop_row; }
|
||||
unsigned virtual_desktop_column() const { return m_virtual_desktop_column; }
|
||||
unsigned workspace_row() const { return m_workspace_row; }
|
||||
unsigned workspace_column() const { return m_workspace_column; }
|
||||
|
||||
private:
|
||||
int m_parent_client_id;
|
||||
|
@ -174,8 +174,8 @@ private:
|
|||
String m_title;
|
||||
Gfx::IntRect m_rect;
|
||||
WindowType m_window_type;
|
||||
unsigned m_virtual_desktop_row;
|
||||
unsigned m_virtual_desktop_column;
|
||||
unsigned m_workspace_row;
|
||||
unsigned m_workspace_column;
|
||||
bool m_active;
|
||||
bool m_modal;
|
||||
bool m_minimized;
|
||||
|
@ -211,10 +211,10 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_bitmap;
|
||||
};
|
||||
|
||||
class WMVirtualDesktopChangedEvent : public WMEvent {
|
||||
class WMWorkspaceChangedEvent : public WMEvent {
|
||||
public:
|
||||
explicit WMVirtualDesktopChangedEvent(int client_id, unsigned current_row, unsigned current_column)
|
||||
: WMEvent(Event::Type::WM_VirtualDesktopChanged, client_id, 0)
|
||||
explicit WMWorkspaceChangedEvent(int client_id, unsigned current_row, unsigned current_column)
|
||||
: WMEvent(Event::Type::WM_WorkspaceChanged, client_id, 0)
|
||||
, m_current_row(current_row)
|
||||
, m_current_column(current_column)
|
||||
{
|
||||
|
|
|
@ -19,12 +19,12 @@ WindowManagerServerConnection& WindowManagerServerConnection::the()
|
|||
}
|
||||
|
||||
void WindowManagerServerConnection::window_state_changed(i32 wm_id, i32 client_id, i32 window_id,
|
||||
i32 parent_client_id, i32 parent_window_id, u32 virtual_desktop_row, u32 virtual_desktop_column,
|
||||
i32 parent_client_id, i32 parent_window_id, u32 workspace_row, u32 workspace_column,
|
||||
bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type,
|
||||
String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(wm_id))
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(client_id, window_id, parent_client_id, parent_window_id, title, rect, virtual_desktop_row, virtual_desktop_column, is_active, is_modal, static_cast<WindowType>(window_type), is_minimized, is_frameless, progress));
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(client_id, window_id, parent_client_id, parent_window_id, title, rect, workspace_row, workspace_column, is_active, is_modal, static_cast<WindowType>(window_type), is_minimized, is_frameless, progress));
|
||||
}
|
||||
|
||||
void WindowManagerServerConnection::applet_area_size_changed(i32 wm_id, const Gfx::IntSize& size)
|
||||
|
@ -64,10 +64,10 @@ void WindowManagerServerConnection::super_space_key_pressed(i32 wm_id)
|
|||
Core::EventLoop::current().post_event(*window, make<WMSuperSpaceKeyPressedEvent>(wm_id));
|
||||
}
|
||||
|
||||
void WindowManagerServerConnection::virtual_desktop_changed(i32 wm_id, u32 row, u32 column)
|
||||
void WindowManagerServerConnection::workspace_changed(i32 wm_id, u32 row, u32 column)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(wm_id))
|
||||
Core::EventLoop::current().post_event(*window, make<WMVirtualDesktopChangedEvent>(wm_id, row, column));
|
||||
Core::EventLoop::current().post_event(*window, make<WMWorkspaceChangedEvent>(wm_id, row, column));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
virtual void applet_area_size_changed(i32, Gfx::IntSize const&) override;
|
||||
virtual void super_key_pressed(i32) override;
|
||||
virtual void super_space_key_pressed(i32) override;
|
||||
virtual void virtual_desktop_changed(i32, u32, u32) override;
|
||||
virtual void workspace_changed(i32, u32, u32) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ WindowServerConnection::WindowServerConnection()
|
|||
// All we have to do is wait for it to arrive. This avoids a round-trip during application startup.
|
||||
auto message = wait_for_specific_message<Messages::WindowClient::FastGreet>();
|
||||
set_system_theme_from_anonymous_buffer(message->theme_buffer());
|
||||
Desktop::the().did_receive_screen_rects({}, message->screen_rects(), message->main_screen_index(), message->virtual_desktop_rows(), message->virtual_desktop_columns());
|
||||
Desktop::the().did_receive_screen_rects({}, message->screen_rects(), message->main_screen_index(), message->workspace_rows(), message->workspace_columns());
|
||||
Gfx::FontDatabase::set_default_font_query(message->default_font_query());
|
||||
Gfx::FontDatabase::set_fixed_width_font_query(message->fixed_width_font_query());
|
||||
m_client_id = message->client_id();
|
||||
|
@ -314,9 +314,9 @@ void WindowServerConnection::menu_item_left(i32 menu_id, u32 identifier)
|
|||
Core::EventLoop::current().post_event(*app, make<ActionEvent>(GUI::Event::ActionLeave, *action));
|
||||
}
|
||||
|
||||
void WindowServerConnection::screen_rects_changed(Vector<Gfx::IntRect> const& rects, u32 main_screen_index, u32 virtual_desktop_rows, u32 virtual_desktop_columns)
|
||||
void WindowServerConnection::screen_rects_changed(Vector<Gfx::IntRect> const& rects, u32 main_screen_index, u32 workspace_rows, u32 workspace_columns)
|
||||
{
|
||||
Desktop::the().did_receive_screen_rects({}, rects, main_screen_index, virtual_desktop_rows, virtual_desktop_columns);
|
||||
Desktop::the().did_receive_screen_rects({}, rects, main_screen_index, workspace_rows, workspace_columns);
|
||||
Window::for_each_window({}, [&](auto& window) {
|
||||
Core::EventLoop::current().post_event(window, make<ScreenRectsChangeEvent>(rects, main_screen_index));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue