feat: screenshot app improvement, WIndow Server supports full-screen overlay, Disks app UI improvements

This commit is contained in:
2026-05-10 10:45:05 +02:00
parent 69fc184a4e
commit 72e4fa080a
29 changed files with 1483 additions and 395 deletions
+4
View File
@@ -83,6 +83,7 @@ namespace Montauk {
static constexpr uint64_t SYS_WINSETSCALE = 65;
static constexpr uint64_t SYS_WINGETSCALE = 66;
static constexpr uint64_t SYS_WINSETCURSOR = 68;
static constexpr uint64_t SYS_WINSETFLAGS = 126;
// Process management syscalls
static constexpr uint64_t SYS_PROCLIST = 61;
@@ -213,8 +214,11 @@ namespace Montauk {
uint8_t dirty;
uint8_t cursor; // 0=arrow, 1=resize_h, 2=resize_v
uint8_t _pad2[2];
uint32_t flags;
};
static constexpr uint32_t WIN_FLAG_FULLSCREEN = 1u << 0;
struct WinCreateResult {
int32_t id; // -1 on failure
uint32_t _pad;
@@ -70,6 +70,11 @@ struct WsWindow {
montauk::win_setcursor(id, cursor);
}
void set_flags(uint32_t flags) const {
if (id >= 0)
montauk::win_setflags(id, flags);
}
void destroy() {
if (id >= 0)
montauk::win_destroy(id);
+1
View File
@@ -67,6 +67,7 @@ struct Window {
bool external; // true = shared-memory window from external process
int ext_win_id; // window server ID (valid when external == true)
uint8_t ext_cursor; // cursor style requested by external app (0=arrow, 1=resize_h, 2=resize_v)
uint32_t ext_flags;
Rect titlebar_rect() const {
return {frame.x, frame.y, frame.w, TITLEBAR_HEIGHT};
+8
View File
@@ -87,6 +87,7 @@ extern "C" {
#define MTK_SYS_WINGETSCALE 66
#define MTK_SYS_MEMSTATS 67
#define MTK_SYS_WINSETCURSOR 68
#define MTK_SYS_WINSETFLAGS 126
#define MTK_SYS_FDELETE 77
#define MTK_SYS_FMKDIR 78
#define MTK_SYS_FRENAME 94
@@ -111,6 +112,8 @@ extern "C" {
#define MTK_EVENT_CLOSE 3
#define MTK_EVENT_SCALE 4
#define MTK_WIN_FLAG_FULLSCREEN (1u << 0)
/* Audio control commands */
#define MTK_AUDIO_SET_VOLUME 0
#define MTK_AUDIO_GET_VOLUME 1
@@ -162,6 +165,7 @@ typedef struct {
uint8_t dirty;
uint8_t cursor;
uint8_t _pad2[2];
uint32_t flags;
} mtk_win_info;
typedef struct {
@@ -492,6 +496,10 @@ static inline int mtk_win_setcursor(int id, int cursor) {
return (int)_mtk_syscall2(MTK_SYS_WINSETCURSOR, (long)id, (long)cursor);
}
static inline int mtk_win_setflags(int id, uint32_t flags) {
return (int)_mtk_syscall2(MTK_SYS_WINSETFLAGS, (long)id, (long)flags);
}
static inline int mtk_win_setscale(int scale) {
return (int)_mtk_syscall1(MTK_SYS_WINSETSCALE, (long)scale);
}
@@ -436,5 +436,8 @@ namespace montauk {
inline int win_setcursor(int id, int cursor) {
return (int)syscall2(Montauk::SYS_WINSETCURSOR, (uint64_t)id, (uint64_t)cursor);
}
inline int win_setflags(int id, uint32_t flags) {
return (int)syscall2(Montauk::SYS_WINSETFLAGS, (uint64_t)id, (uint64_t)flags);
}
}