|
@@ -288,6 +288,10 @@ void slop::WindowRectangle::applyPadding( int padding ) {
|
288
|
288
|
}
|
289
|
289
|
}
|
290
|
290
|
|
|
291
|
+Window slop::WindowRectangle::getWindow() {
|
|
292
|
+ return m_window;
|
|
293
|
+}
|
|
294
|
+
|
291
|
295
|
void slop::WindowRectangle::applyMinMaxSize( int minimumsize, int maximumsize ) {
|
292
|
296
|
if ( minimumsize > maximumsize && maximumsize > 0 ) {
|
293
|
297
|
fprintf( stderr, "Error: minimumsize is greater than maximumsize.\n" );
|
|
@@ -337,6 +341,8 @@ void slop::WindowRectangle::setGeometry( Window win, bool decorations ) {
|
337
|
341
|
status = XQueryTree( xengine->m_display, test, &root, &parent, &childlist, &ujunk);
|
338
|
342
|
free( childlist );
|
339
|
343
|
}
|
|
344
|
+ // test contains the window we're screenshotting.
|
|
345
|
+ m_window = test;
|
340
|
346
|
// Once found, proceed normally.
|
341
|
347
|
if ( test && parent == root && status ) {
|
342
|
348
|
XWindowAttributes attr;
|
|
@@ -362,4 +368,5 @@ void slop::WindowRectangle::setGeometry( Window win, bool decorations ) {
|
362
|
368
|
m_height = attr.height;
|
363
|
369
|
m_border = attr.border_width;
|
364
|
370
|
XTranslateCoordinates( xengine->m_display, win, attr.root, -attr.border_width, -attr.border_width, &(m_x), &(m_y), &junk );
|
|
371
|
+ m_window = win;
|
365
|
372
|
}
|