[XembedSNIProxy] Check size in each update()

Authored by kmaterka on Oct 10 2019, 2:17 PM.

Description

[XembedSNIProxy] Check size in each update()

Summary:
If needed, perform resize in each update().
Client window may be too big, it must be resized to a certain reasonable size. Sometimes resizing in the constructor is not enough because it is too early and the client window is not fully initialized. Even if client window is resized, on first update it reverts back to original size (or just ignores the first request - some kind of a race condition).

In addition, I applied some rules from: https://community.kde.org/Policies/Kdelibs_Coding_Style

BUG: 358240

Test Plan:
I tested it using keepass2, now it shows better results (still not perfect). Window is resized to 32x32, but icon is only 24x24 it top-left. Better than 273x273 with tiny dot in the corner. This is a workaround for unsolvable bug in Mono - AFAIK Windows Forms are not longer maintained so it won't be fixed.

I tested this change with several other apps for regressions, no issues:
pidgin
liferea
hexchat
tuxguitar
xchat
keepassx
stardict
and other I don't remember now. No regressions.

Reviewers: davidedmundson, Plasma, Plasma: Workspaces, broulik

Reviewed By: davidedmundson, Plasma, Plasma: Workspaces

Subscribers: broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D24529

Details

Committed
ngrahamOct 10 2019, 2:31 PM
Reviewer
Plasma
Differential Revision
D24529: [XembedSNIProxy] Check size in each update()
Parents
R120:9290f05a20ec: Update version number for 5.17.0 GIT_SILENT
Branches
Unknown
Tags
Unknown