Sfoglia il codice sorgente

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

Dalton Nell 10 anni fa
parent
commit
761a7c0d00
3 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 1
    1
      CMakeLists.txt
  2. 1
    1
      README.md
  3. 6
    1
      src/main.cpp

+ 1
- 1
CMakeLists.txt Vedi 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 Vedi 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 Vedi 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
         }