2019-04-23 18:14:14 -03:00
|
|
|
#include "TaskbarButton.h"
|
|
|
|
|
#include <LibGUI/GAction.h>
|
2019-11-08 07:39:45 -03:00
|
|
|
#include <LibGUI/GWindowServerConnection.h>
|
2019-04-23 18:14:14 -03:00
|
|
|
|
|
|
|
|
TaskbarButton::TaskbarButton(const WindowIdentifier& identifier, GWidget* parent)
|
|
|
|
|
: GButton(parent)
|
|
|
|
|
, m_identifier(identifier)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TaskbarButton::~TaskbarButton()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TaskbarButton::context_menu_event(GContextMenuEvent&)
|
|
|
|
|
{
|
2019-12-02 05:33:37 -03:00
|
|
|
GWindowServerConnection::the().post_message(WindowServer::WM_PopupWindowMenu(m_identifier.client_id(), m_identifier.window_id(), screen_relative_rect().location()));
|
2019-04-23 18:14:14 -03:00
|
|
|
}
|
2019-12-03 17:34:34 -03:00
|
|
|
|
|
|
|
|
void TaskbarButton::resize_event(GResizeEvent& event)
|
|
|
|
|
{
|
|
|
|
|
GWindowServerConnection::the().post_message(
|
|
|
|
|
WindowServer::WM_SetWindowTaskbarRect(
|
|
|
|
|
m_identifier.client_id(),
|
|
|
|
|
m_identifier.window_id(),
|
|
|
|
|
screen_relative_rect()));
|
|
|
|
|
return GButton::resize_event(event);
|
|
|
|
|
}
|