Browse Source

Slop now outputs the root window ID when no window is selected.

Dalton Nell 10 years ago
parent
commit
761a7c0d00
3 changed files with 8 additions and 3 deletions
  1. 1
    1
      CMakeLists.txt
  2. 1
    1
      README.md
  3. 6
    1
      src/main.cpp

+ 1
- 1
CMakeLists.txt View File

@@ -3,7 +3,7 @@ cmake_minimum_required( VERSION 2.8 )
3 3
 project( "slop" )
4 4
 set( slop_VERSION_MAJOR 3 )
5 5
 set( slop_VERSION_MINOR 1 )
6
-set( slop_VERSION_PATCH 14 )
6
+set( slop_VERSION_PATCH 15 )
7 7
 
8 8
 set( BIN_TARGET     "${PROJECT_NAME}" )
9 9
 set( CMAKE_INSTALL_PREFIX "/usr/bin" )

+ 1
- 1
README.md View File

@@ -84,7 +84,7 @@ Make sure to check out and install [maim](https://github.com/naelstrof/maim) too
84 84
 help
85 85
 ----
86 86
 ```text
87
-slop v3.1.14
87
+slop v3.1.15
88 88
 
89 89
 Copyright (C) 2014 Dalton Nell, Slop Contributors
90 90
 (https://github.com/naelstrof/slop/graphs/contributors)

+ 6
- 1
src/main.cpp View File

@@ -432,8 +432,13 @@ int app( int argc, char** argv ) {
432 432
                 h = selection->m_height;
433 433
                 // Delete the rectangle, which will remove it from the screen.
434 434
                 delete selection;
435
+                // Make sure if no window was specifically specified, that we output the root window.
436
+                Window temp = window;
437
+                if ( temp == None ) {
438
+                    temp = xengine->m_root;
439
+                }
435 440
                 // Print the selection :)
436
-                printSelection( format, false, x, y, w, h, window );
441
+                printSelection( format, false, x, y, w, h, temp );
437 442
                 break;
438 443
             }
439 444
         }