Bug 136142 - KSnapshot won't take screenshots of narrow windows
Summary: KSnapshot won't take screenshots of narrow windows
Status: RESOLVED FIXED
Alias: None
Product: ksnapshot
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 20:05 UTC by Dima Ryazanov
Modified: 2013-01-14 21:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2006-10-22 20:05:34 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1)
 
OS:                Linux

1. Open a window that can be resized to be very narrow - e.g., xclock
2. Decrease its width to about 80px - until the close button disappears
3. Run ksnapshot, select the "Section of window" mode, and take a screenshot.

KSnapshot shows no error messages, but doesn't do anything.
Comment 1 Philip Rodrigues 2006-10-22 22:37:20 UTC
Works fine here (SVN just pre 3.5.5 on freebsd)
Comment 2 Richard Moore 2007-01-20 23:34:29 UTC
I've been able to reproduce this with xclock, but not with anything else. What other apps show this behaviour?
Comment 3 Dima Ryazanov 2007-01-21 06:21:23 UTC
I ran into this problem when I was using GLUT, and created a very small window.

But, here's a Qt example:

#include <qapplication.h>
#include <qpushbutton.h>

int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    QPushButton hello( "Hello", 0 );
    hello.resize( 70, 30 );

    a.setMainWidget( &hello );
    hello.show();
    return a.exec();
}

Same problem.
Now try this, though:

#include <qapplication.h>
#include <qpushbutton.h>
#include <qvbox.h>

int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    QVBox box;
    box.resize( 70, 60 );

    QPushButton hello1( "Hello1", &box );
    QPushButton hello2( "Hello2", &box );

    a.setMainWidget( &box );
    box.show();

    return a.exec();
}

You can take a screenshot of the whole window and the second button - but not the first button!

So it seems that the first widget is causing problems... And in the first example and in xclock, there is only one widget. Well, I actually have no idea how widgets and X work, so it's just a guess.
Comment 4 Dima Ryazanov 2007-01-21 06:30:23 UTC
Another example.

1. Add a new panel (right-click on the main panel, or whatever; Panel Menu->Add New Panel->Panel).
2. Move it to the left of the screen.
3. Take a screenshot of it. Doesn't work!

4. Right-click, "Configure Panel...", make it shorter than 100%. An arrow appears at the bottom. (Though now you can make it 100% again - the arrow stays. Bug?)
5. Take a screenshot of the panel. It works now!
6. Take a screenshot of the arrow... Doesn't work.
Comment 5 Aaron J. Seigo 2007-02-10 07:10:52 UTC
i can reproduce #4 but all the rest work just fine here with 3.5.6 on Kubuntu Edgy
Comment 6 Adrián Chaves (Gallaecio) 2012-12-02 15:12:21 UTC
I’ve just opened a review request for a patch. For more details, see https://git.reviewboard.kde.org/r/107555/
Comment 7 Albert Astals Cid 2013-01-14 21:26:52 UTC
Git commit b3fa5727d56f93d14ecba8f7ed2f969dcb1d9961 by Albert Astals Cid, on behalf of Adrián Chaves Fernández.
Committed on 14/01/2013 at 22:25.
Pushed by aacid into branch 'KDE/4.10'.

take screenshots of windows no matter how narrow they are
REVIEW: 107555

M  +1    -1    windowgrabber.cpp

http://commits.kde.org/ksnapshot/b3fa5727d56f93d14ecba8f7ed2f969dcb1d9961