Fix QScreen::grabWindow() on Windows
Finish up 94ac17c2cc
Task-number: QTBUG-26963
Change-Id: I13f52f0a6cf460d525b53338738aecd4b3cf313c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
2b69431d3c
commit
dc5359a312
@ -183,12 +183,10 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat =
|
||||
|
||||
QPixmap QWindowsScreen::grabWindow(WId window, int x, int y, int width, int height) const
|
||||
{
|
||||
// TODO: handle window==0, i.e. grab whole screen
|
||||
|
||||
if (QWindowsContext::verboseIntegration)
|
||||
qDebug() << __FUNCTION__ << window << x << y << width << height;
|
||||
RECT r;
|
||||
HWND hwnd = (HWND)window;
|
||||
HWND hwnd = window ? (HWND)window : GetDesktopWindow();
|
||||
GetClientRect(hwnd, &r);
|
||||
|
||||
if (width < 0) width = r.right - r.left;
|
||||
|
Loading…
Reference in New Issue
Block a user