1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

Taskbar: Only show the current desktop's window buttons

By tracking what virtual desktop a window is on, and what desktop is
being viewed we can show or hide the window buttons accordingly.
This commit is contained in:
Tom 2021-06-30 20:16:19 -06:00 committed by Andreas Kling
parent 5acee4b4d0
commit cc707270ae
4 changed files with 40 additions and 1 deletions

View file

@ -48,6 +48,14 @@ public:
void set_modal(bool modal) { m_modal = modal; }
bool is_modal() const { return m_modal; }
void set_virtual_desktop(unsigned row, unsigned column)
{
m_virtual_desktop_row = row;
m_virtual_desktop_column = column;
}
unsigned virtual_desktop_row() const { return m_virtual_desktop_row; }
unsigned virtual_desktop_column() const { return m_virtual_desktop_column; }
void set_progress(Optional<int> progress)
{
if (m_progress == progress)
@ -68,6 +76,8 @@ private:
Gfx::IntRect m_rect;
RefPtr<GUI::Button> m_button;
RefPtr<Gfx::Bitmap> m_icon;
unsigned m_virtual_desktop_row { 0 };
unsigned m_virtual_desktop_column { 0 };
bool m_active { false };
bool m_minimized { false };
bool m_modal { false };