mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 22:57:40 -05:00
[Windows] After switching to fullscreen and back to windowed mode, both the client window's width and height increase by 1 pixel #3194
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk#3194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Prcuvu on GitHub (Oct 16, 2024).
Bug Description
I am using Windows client.
Every time I enter and exit fullscreen mode, both the client window's width and height increase by 1 pixel. The client window silently becomes larger and larger over time, ultimately its bottom edge goes under my local side desktop's taskbar, causing the remote side's taskbar becoming covered, and making it impossible to drag the bottom edge (because it is covered by my local side taskbar) to resize the client window.
This can be extremely annoying.
How to Reproduce
Expected Behavior
The client window should remain the same size by toggling between fullscreen mode and windowed mode.
Operating system(s) on local side and remote side
Windows 10 -> Windows 10
RustDesk Version(s) on local side and remote side
1.3.1 -> 1.2.3-2
Screenshots
The description should be self-explanatory enough.
Additional Context
Both my local side and remote side use 1920 × 1080 resolution.
The problem can be observed on every Windows client from version 1.2.2 to 1.3.1.
@rustdesk commented on GitHub (Oct 16, 2024):
@fufesou high priority. might be related to number round.
@rustdesk commented on GitHub (Oct 16, 2024):
https://github.com/leanflutter/window_manager/issues/131#issuecomment-1111587982
@Prcuvu commented on GitHub (Oct 17, 2024):
The relevant change is from #2200:
github.com/rustdesk/rustdesk@5e920f0fd0/flutter/lib/models/state_model.dart (L104-L112)Why resize the window? If it is necessary to force a window redraw, I believe Windows API call
RedrawWindow(hWnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW)should do the job.@fufesou commented on GitHub (Oct 17, 2024):
The problem is I can't reproduce that issue now. I'm not sure if this call or the resize are required.
@Prcuvu commented on GitHub (Oct 17, 2024):
It seems to be Windows-specific. Can't you reproduce it using Windows client?
@fufesou commented on GitHub (Oct 17, 2024):
Yes. I've tried Win10 and Win11.
@Prcuvu commented on GitHub (Oct 17, 2024):
I am not sure if it works, apparently a quick fix would be something like:
@rustdesk commented on GitHub (Oct 17, 2024):
We have considered this. This will make the window refresh twice, and you will see a flash. We want to remove the +1, but we are unsure if there will be any adverse effects, although we cannot see any for now, we are not 100% certain.