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
 project( "slop" )
3
 project( "slop" )
4
 set( slop_VERSION_MAJOR 3 )
4
 set( slop_VERSION_MAJOR 3 )
5
 set( slop_VERSION_MINOR 1 )
5
 set( slop_VERSION_MINOR 1 )
6
-set( slop_VERSION_PATCH 14 )
6
+set( slop_VERSION_PATCH 15 )
7
 
7
 
8
 set( BIN_TARGET     "${PROJECT_NAME}" )
8
 set( BIN_TARGET     "${PROJECT_NAME}" )
9
 set( CMAKE_INSTALL_PREFIX "/usr/bin" )
9
 set( CMAKE_INSTALL_PREFIX "/usr/bin" )

+ 1
- 1
README.md View File

84
 help
84
 help
85
 ----
85
 ----
86
 ```text
86
 ```text
87
-slop v3.1.14
87
+slop v3.1.15
88
 
88
 
89
 Copyright (C) 2014 Dalton Nell, Slop Contributors
89
 Copyright (C) 2014 Dalton Nell, Slop Contributors
90
 (https://github.com/naelstrof/slop/graphs/contributors)
90
 (https://github.com/naelstrof/slop/graphs/contributors)

+ 6
- 1
src/main.cpp View File

432
                 h = selection->m_height;
432
                 h = selection->m_height;
433
                 // Delete the rectangle, which will remove it from the screen.
433
                 // Delete the rectangle, which will remove it from the screen.
434
                 delete selection;
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
                 // Print the selection :)
440
                 // Print the selection :)
436
-                printSelection( format, false, x, y, w, h, window );
441
+                printSelection( format, false, x, y, w, h, temp );
437
                 break;
442
                 break;
438
             }
443
             }
439
         }
444
         }