mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-20 13:10:07 -08:00
lnx_wm: x11 borderless / redraw-while-resizing
This commit is contained in:
1 parent
a0a16ea11e
commit
e6e0992c63
2 files changed
+299
-46
No files matched your search
@@ -16,9 +16,32 @@
|
||||
#include <poll.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: X definitions
|
||||
|
||||
#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0
|
||||
#define _NET_WM_MOVERESIZE_SIZE_TOP 1
|
||||
#define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2
|
||||
#define _NET_WM_MOVERESIZE_SIZE_RIGHT 3
|
||||
#define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4
|
||||
#define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5
|
||||
#define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6
|
||||
#define _NET_WM_MOVERESIZE_SIZE_LEFT 7
|
||||
#define _NET_WM_MOVERESIZE_MOVE 8 /* movement only */
|
||||
#define _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9 /* size via keyboard */
|
||||
#define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10 /* move via keyboard */
|
||||
#define _NET_WM_MOVERESIZE_CANCEL 11 /* cancel operation */
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Window State
|
||||
|
||||
typedef struct LNX_WM_WindowClientArea LNX_WM_WindowClientArea;
|
||||
struct LNX_WM_WindowClientArea
|
||||
{
|
||||
LNX_WM_WindowClientArea *next;
|
||||
Rng2F32 rect;
|
||||
};
|
||||
|
||||
typedef struct LNX_WM_Window LNX_WM_Window;
|
||||
struct LNX_WM_Window
|
||||
{
|
||||
@@ -28,6 +51,14 @@ struct LNX_WM_Window
|
||||
XIC xic;
|
||||
XID counter_xid;
|
||||
U64 counter_value;
|
||||
B32 resize_draw;
|
||||
Rng2F32 last_synced_rect;
|
||||
B32 waiting_for_resize;
|
||||
B32 custom_border;
|
||||
F32 custom_title_bar_thickness;
|
||||
F32 custom_edge_thickness;
|
||||
LNX_WM_WindowClientArea *first_client_area;
|
||||
LNX_WM_WindowClientArea *last_client_area;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
@@ -52,6 +83,7 @@ struct LNX_WM_State
|
||||
Visual *window_visual;
|
||||
int window_depth;
|
||||
Colormap window_colormap;
|
||||
LNX_WM_WindowClientArea *free_client_area;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
@@ -63,5 +95,6 @@ global LNX_WM_State *lnx_wm_state = 0;
|
||||
//~ rjf: Helpers
|
||||
|
||||
internal LNX_WM_Window *lnx_window_from_x11window(Window window);
|
||||
internal int lnx_moveresize_code_from_pos(LNX_WM_Window *window, Vec2F32 pos, B32 *out_is_in_client_area);
|
||||
|
||||
#endif // LINUX_WINDOW_MANAGER_H
|
||||
Reference in new issue
Block a user