Bläddra i källkod

Fixed a bug where a single pixel isn't accounted for when selecting the entire screen. Upped version for previous changes

naelstrof 9 år sedan
förälder
incheckning
a8f1e5cd57
3 ändrade filer med 7 tillägg och 2 borttagningar
  1. 1
    1
      CMakeLists.txt
  2. 1
    1
      README.md
  3. 5
    0
      src/main.cpp

+ 1
- 1
CMakeLists.txt Visa fil

@@ -3,7 +3,7 @@ cmake_minimum_required( VERSION 2.8 )
3 3
 project( "slop" )
4 4
 set( slop_VERSION_MAJOR 4 )
5 5
 set( slop_VERSION_MINOR 2 )
6
-set( slop_VERSION_PATCH 18 )
6
+set( slop_VERSION_PATCH 19 )
7 7
 
8 8
 set( CMAKE_OPENGL_SUPPORT FALSE CACHE BOOL "Whether or not to compile with OpenGL, shaders, magnification, and theming support." )
9 9
 

+ 1
- 1
README.md Visa fil

@@ -115,7 +115,7 @@ Feel free to make your own themes and submit a pull request to see if it can be
115 115
 help
116 116
 ----
117 117
 ```text
118
-slop v4.2.18
118
+slop v4.2.19
119 119
 
120 120
 Copyright (C) 2014 Dalton Nell, Slop Contributors
121 121
 (https://github.com/naelstrof/slop/graphs/contributors)

+ 5
- 0
src/main.cpp Visa fil

@@ -54,6 +54,11 @@ void current_utc_time(struct timespec *ts) {
54 54
 }
55 55
 
56 56
 int printSelection( std::string format, bool cancelled, int x, int y, int w, int h, int window ) {
57
+    //Impossible to select nothing
58
+    if (!cancelled) {
59
+        w += 1;
60
+        h += 1;
61
+    }
57 62
     size_t pos = 0;
58 63
     while ( ( pos = format.find( "%", pos ) ) != std::string::npos ) {
59 64
         if ( pos + 1 > format.size() ) {