aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--src/QuickMedia.cpp18
2 files changed, 11 insertions, 10 deletions
diff --git a/TODO b/TODO
index b6cf6af..44a75aa 100644
--- a/TODO
+++ b/TODO
@@ -237,4 +237,5 @@ Add option to use invidious, and the invidious front page.
Add proper vim modal mode. Maybe switch focused part with tab? then also need to show which part is focused.
Send clipboard content to clipboard manager when destroying the window, if we are the clipboard owner.
Bypass compositor when fullscreening application.
-Sort matrix events by timestamp. This is needed to make name change and other similar things work properly, otherwise @ mention wont work as it may show an older name if a previous event is fetched and contains name change. Also applies to join/leave events and other things. \ No newline at end of file
+Sort matrix events by timestamp. This is needed to make name change and other similar things work properly (user display name, avatar, room name, room avatar, etc), otherwise @ mention wont work as it may show an older name if a previous event is fetched and contains name change. Also applies to join/leave events and other things.
+Automatically cleanup old cache files.
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index fb97ca6..4b441ec 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -169,14 +169,14 @@ static int get_largest_monitor_height(Display *display) {
});
if(max_height == 0)
- max_height = DefaultScreenOfDisplay(display)->height;
+ max_height = XHeightOfScreen(DefaultScreenOfDisplay(display));
return std::max(max_height, 240);
}
static void get_screen_resolution(Display *display, int *width, int *height) {
- *width = DefaultScreenOfDisplay(display)->width;
- *height = DefaultScreenOfDisplay(display)->height;
+ *width = XWidthOfScreen(DefaultScreenOfDisplay(display));
+ *height = XHeightOfScreen(DefaultScreenOfDisplay(display));
}
static mgl::Color interpolate_colors(mgl::Color source, mgl::Color target, double progress) {
@@ -649,11 +649,11 @@ namespace QuickMedia {
mgl::vec2i focused_monitor_center = get_focused_monitor_center(disp, monitor_size);
if(strcmp(plugin_name, "download") == 0) {
- window_size.x = std::min(900, monitor_size.x);
- window_size.y = std::min(900, monitor_size.y);
+ window_size.x = std::min(900, monitor_size.x - 100);
+ window_size.y = std::min(900, monitor_size.y - 100);
} else {
- window_size.x = std::min(window_size.x, monitor_size.x);
- window_size.y = std::min(window_size.y, monitor_size.y);
+ window_size.x = std::min(window_size.x, monitor_size.x - 100);
+ window_size.y = std::min(window_size.y, monitor_size.y - 100);
}
mgl::Window::CreateParams window_create_params;
@@ -7898,8 +7898,8 @@ namespace QuickMedia {
mgl::vec2i monitor_size;
mgl::vec2i focused_monitor_center = get_focused_monitor_center(disp, monitor_size);
- window_size.x = std::min(monitor_size.x, (int)(300.0f + 380.0f * get_config().scale));
- window_size.y = std::min(monitor_size.y, (int)(50.0f + 130.0f * get_config().scale));
+ window_size.x = std::min(monitor_size.x - 100, (int)(300.0f + 380.0f * get_config().scale));
+ window_size.y = std::min(monitor_size.y - 100, (int)(50.0f + 130.0f * get_config().scale));
window.set_size(mgl::vec2i(window_size.x, window_size.y));
window.set_size_limits(window_size, window_size);
window.set_position(mgl::vec2i(focused_monitor_center.x - window_size.x * 0.5f, focused_monitor_center.y - window_size.y * 0.5f));