diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-03 18:16:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-03 18:16:42 +0200 |
commit | a2e9e999018f021134129b24fb941c485e6c44b6 (patch) | |
tree | 6cf5675ebcd6e04a2f6f4bf2671744d3df530956 | |
parent | c0461acb94ac27457be8b1dc3e80f21bac9f719e (diff) |
Change window type to notification (keeps position on screen when changing workspace on dwm
m--------- | depends/mglpp | 0 | ||||
-rw-r--r-- | src/main.cpp | 6 |
2 files changed, 4 insertions, 2 deletions
diff --git a/depends/mglpp b/depends/mglpp -Subproject be41f208c6660a879818321e2904795c7d45fe3 +Subproject 5d5a88afbc57ee72c7bbab05ee58aebd64ee3f6 diff --git a/src/main.cpp b/src/main.cpp index 8f40d39..c50149d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -205,7 +205,7 @@ int main(int argc, char **argv) { window_create_params.override_redirect = true; window_create_params.background_color = bg_color; window_create_params.hide_decorations = true; - window_create_params.window_type = MGL_WINDOW_TYPE_DIALOG; + window_create_params.window_type = MGL_WINDOW_TYPE_NOTIFICATION; mgl::Window window; if(!window.create("GPU Screen Recorder Notification", window_create_params)) @@ -250,7 +250,9 @@ int main(int argc, char **argv) { padding_between_icon_and_text_x = (int)(logo_sprite_padding_x * 0.7f); } - // TODO: Use the monitor that the cursor is on or the focused window is on + // TODO: Use the monitor that the cursor is on or the focused window is on. + // TODO: Update position when workspace changes (in dwm, sticky property handles it in real workspaces). + // TODO: Make sure the notification always stays on top. Test with starting the notification and then opening youtube in fullscreen. const int window_width = content_padding_left + logo_sprite_padding_x + logo_sprite.get_size().x + padding_between_icon_and_text_x + text.get_bounds().size.x + logo_sprite_padding_x + padding_between_icon_and_text_x; const mgl::vec2i window_size{window_width, window_height}; const mgl::vec2i window_start_position{win->monitors[0].size.x, window_size.y}; |