Update screen dimensions only if they really change

This commit is contained in:
Bart J 2018-08-04 16:01:53 +02:00
parent e438bc62a6
commit 63839f9fc7
2 changed files with 2 additions and 3 deletions

View File

@ -119,8 +119,7 @@ int X11Grabber::grabFrame(Image<ColorRgb> & image, bool forceUpdate)
{ {
if (!_enabled) return 0; if (!_enabled) return 0;
if (forceUpdate) updateScreenDimensions(forceUpdate);
updateScreenDimensions(forceUpdate);
if (_XRenderAvailable && !_useXGetImage) if (_XRenderAvailable && !_useXGetImage)
{ {

View File

@ -36,7 +36,7 @@ bool X11Wrapper::displayInit()
void X11Wrapper::capture() void X11Wrapper::capture()
{ {
_grabber.grabFrame(_screenshot, true); _grabber.grabFrame(_screenshot, false);
emit sig_screenshot(_screenshot); emit sig_screenshot(_screenshot);
} }