GNOME Wayland: Fix remembered window size smaller than actual size
Fixes #6946
This commit is contained in:
parent
fb1124b1b9
commit
858f0c1073
4 changed files with 9 additions and 4 deletions
|
|
@ -69,9 +69,9 @@ Detailed list of changes
|
|||
|
||||
- kitty keyboard protocol: Specify the behavior of the modifier bits during modifier key events (:iss:`6913`)
|
||||
|
||||
- Wayland: Enable support for the new cursor-shape protocol so that the mouse
|
||||
cursor is always rendered at the correct size in compositors that support
|
||||
this protocol (:iss:`6914`)
|
||||
- Wayland: Enable support for the new cursor-shape protocol so that the mouse cursor is always rendered at the correct size in compositors that support this protocol (:iss:`6914`)
|
||||
|
||||
- GNOME Wayland: Fix remembered window size smaller than actual size (:iss:`6946`)
|
||||
|
||||
|
||||
0.31.0 [2023-11-08]
|
||||
|
|
|
|||
|
|
@ -1089,6 +1089,10 @@ close_os_window(ChildMonitor *self, OSWindow *os_window) {
|
|||
if (os_window->before_fullscreen.is_set && is_os_window_fullscreen(os_window)) {
|
||||
w = os_window->before_fullscreen.w; h = os_window->before_fullscreen.h;
|
||||
}
|
||||
// On GNOME Wayland w, h are the content area size, we need to add the frame size back
|
||||
int content_area_width, content_area_height;
|
||||
adjust_window_size_for_csd(os_window, w, h, &content_area_width, &content_area_height);
|
||||
w += w - content_area_width; h += h - content_area_height;
|
||||
destroy_os_window(os_window);
|
||||
call_boss(on_os_window_closed, "Kii", os_window->id, w, h);
|
||||
for (size_t t=0; t < os_window->num_tabs; t++) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ min_size_for_os_window(OSWindow *window, int *min_width, int *min_height) {
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
adjust_window_size_for_csd(OSWindow *w, int width, int height, int *adjusted_width, int *adjusted_height) {
|
||||
*adjusted_width = width; *adjusted_height = height;
|
||||
if (global_state.is_wayland) {
|
||||
|
|
|
|||
|
|
@ -391,3 +391,4 @@ void update_menu_bar_title(PyObject *title UNUSED);
|
|||
void change_live_resize_state(OSWindow*, bool);
|
||||
bool render_os_window(OSWindow *w, monotonic_t now, bool ignore_render_frames, bool scan_for_animated_images);
|
||||
void update_mouse_pointer_shape(void);
|
||||
void adjust_window_size_for_csd(OSWindow *w, int width, int height, int *adjusted_width, int *adjusted_height);
|
||||
|
|
|
|||
Loading…
Reference in a new issue