Bug 57980 - [Qt] Reduce default test app window size for environments with small display sizes
Summary: [Qt] Reduce default test app window size for environments with small display ...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P3 Enhancement
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-04-06 14:06 PDT by Keith Kyzivat
Modified: 2011-04-07 09:34 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.62 KB, patch)
2011-04-06 14:42 PDT, Keith Kyzivat
benjamin: review-
Details | Formatted Diff | Diff
Patch auto-maximizing if screen size of default screen is < 640 width or < 480 height. (1.63 KB, patch)
2011-04-06 20:27 PDT, Keith Kyzivat
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Kyzivat 2011-04-06 14:06:02 PDT
Qt Gui applications on some embedded Qt environments will crash if the size of windows extends beyond the display size.

Currently the QtTestBrowser and MiniBrowser test browsers will set their main window size to 800x600 for all platforms except Symbian (which sets it to WindowMaximized).

These platforms should not to crash on startup.
Comment 1 Benjamin Poulain 2011-04-06 14:13:05 PDT
Sounds like
Comment 2 Benjamin Poulain 2011-04-06 14:13:27 PDT
Sounds like a bug in Qt, not WebKit.
Comment 3 Keith Kyzivat 2011-04-06 14:42:01 PDT
Created attachment 88517 [details]
Patch
Comment 4 Keith Kyzivat 2011-04-06 14:46:34 PDT
It does sound like a bug in Qt, however having a workaround in the meantime would be nice.

See my patch for one possible solution.

If you don't like that, I can add a -maximized or -size option to QtTestBrowser and MiniBrowser.
Comment 5 Benjamin Poulain 2011-04-06 14:54:14 PDT
Comment on attachment 88517 [details]
Patch

Ok, unless there is an insanely good reason not to fix the bug where it is, I really don't like this patch. :)
Workaround for platform bug, for a platform we control, is something we can generally avoid.
Comment 6 Keith Kyzivat 2011-04-06 19:13:35 PDT
Change title from:
 [Qt] Reduce default test app window size for embedded qt
to:
 [Qt] Reduce default test app window size for environments with small display sizes
Comment 7 Keith Kyzivat 2011-04-06 19:33:34 PDT
It still would be nice for small-screen devices (mobile phones, PDAs, GPS units, ...) to start maximized without specifying any command line arguments.

I think I have come up with a reasonable way to do this without having platform #ifdefs.

Get the screen geometry of the default screen from QApplication::desktop()->screenGeometry().size(), and if it is less than some defined dimensions (640x480?), set the application window maximized.

Does this seem reasonable?
Comment 8 Keith Kyzivat 2011-04-06 20:27:07 PDT
Created attachment 88563 [details]
Patch auto-maximizing if screen size of default screen is < 640 width or < 480 height.

Not a proper patch, as it depends on the patch I provided in bug 58007 (Attachment 88558 [details]), so not r?ing it.
Comment 9 Benjamin Poulain 2011-04-07 05:10:27 PDT
I suggest to close this, fix the window manager and 58007 instead.
Comment 10 Keith Kyzivat 2011-04-07 09:30:19 PDT
<lgombos> seems reasonable to detect screen size runtime and make a decision
<benjaminp> that is the job of the window manager, not our
<benjaminp> I have played with a few embedded system, and appart from Symbian, the WM usually does its job
<keithel> benjaminp, If a main window is sized > screen size, what normally happens on X?
<keithel> (suppose I should try this, its easy enough).
<lgombos> ok, but we have resize(800, 600) hardcoded so window manager can not pick default size
<benjaminp> keithel: depend on the window manager, usually it is resized to the current screen size
<benjaminp> lgombos: of course it can, the WM cannot change if you set the minimum size
<benjaminp> but again, I am not strongly against the change... I just think it is a fix at the wrong place
<lgombos> benjaminp: I see, so the WM does not need to honour 800x 600
<benjaminp> nope
<benjaminp> that is why that works on QtEmbedded or Maemo
<lgombos> benjaminp: thanks for the help, I understand your argument better.
Comment 11 Keith Kyzivat 2011-04-07 09:34:46 PDT
Should be fixed in window manager.