WindowServer: Show a special "move" cursor when dragging windows around.
This commit is contained in:
parent
af09f994ba
commit
42c95959a8
Notes:
sideshowbarker
2024-07-19 14:51:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/42c95959a8e
3 changed files with 5 additions and 0 deletions
BIN
Base/res/cursors/move.png
Normal file
BIN
Base/res/cursors/move.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 711 B |
|
@ -167,6 +167,7 @@ WSWindowManager::WSWindowManager()
|
|||
m_resize_diagonally_bltr_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/resize-diagonal-bltr.png"));
|
||||
m_i_beam_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/i-beam.png"));
|
||||
m_disallowed_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/disallowed.png"));
|
||||
m_move_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/move.png"));
|
||||
|
||||
m_wallpaper_path = "/res/wallpapers/retro.rgb";
|
||||
m_wallpaper = GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, m_wallpaper_path, { 1024, 768 });
|
||||
|
@ -1238,6 +1239,9 @@ void WSWindowManager::notify_client_changed_app_menubar(WSClientConnection& clie
|
|||
|
||||
const WSCursor& WSWindowManager::active_cursor() const
|
||||
{
|
||||
if (m_drag_window)
|
||||
return *m_move_cursor;
|
||||
|
||||
if (m_resize_window) {
|
||||
switch (m_resize_direction) {
|
||||
case ResizeDirection::Up:
|
||||
|
|
|
@ -164,6 +164,7 @@ private:
|
|||
RetainPtr<WSCursor> m_resize_diagonally_bltr_cursor;
|
||||
RetainPtr<WSCursor> m_i_beam_cursor;
|
||||
RetainPtr<WSCursor> m_disallowed_cursor;
|
||||
RetainPtr<WSCursor> m_move_cursor;
|
||||
|
||||
OwnPtr<Painter> m_back_painter;
|
||||
OwnPtr<Painter> m_front_painter;
|
||||
|
|
Loading…
Add table
Reference in a new issue