Browse Source

oops now i fixed the accuracy, I think

naelstrof 11 years ago
parent
commit
a70b3ada43
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      main.cpp

+ 6
- 6
main.cpp View File

103
                         xengine->removeRect( windowselection ); // removeRect also dealloc's the rectangle for us.
103
                         xengine->removeRect( windowselection ); // removeRect also dealloc's the rectangle for us.
104
                     }
104
                     }
105
                     slop::WindowRectangle t = xengine->m_hoverWindow;
105
                     slop::WindowRectangle t = xengine->m_hoverWindow;
106
-                    windowselection = new slop::Rectangle( t.m_x - t.m_border,
107
-                                                         t.m_y - t.m_border,
106
+                    windowselection = new slop::Rectangle( t.m_x,
107
+                                                         t.m_y,
108
                                                          t.m_width + t.m_border * 2,
108
                                                          t.m_width + t.m_border * 2,
109
                                                          t.m_height + t.m_border * 2,
109
                                                          t.m_height + t.m_border * 2,
110
                                                          borderSize, padding,
110
                                                          borderSize, padding,
209
                 // --but only if the user lets us, if the user doesn't just select a single pixel there.
209
                 // --but only if the user lets us, if the user doesn't just select a single pixel there.
210
                 if ( tolerance > 0 ) {
210
                 if ( tolerance > 0 ) {
211
                     slop::WindowRectangle t = xengine->m_hoverWindow;
211
                     slop::WindowRectangle t = xengine->m_hoverWindow;
212
-                    x = t.m_x - padding - t.m_border;
213
-                    y = t.m_y - padding - t.m_border;
214
-                    w = t.m_width + t.m_border * 2 + padding*2;
215
-                    h = t.m_height + t.m_border * 2 + padding*2;
212
+                    x = t.m_x - padding;
213
+                    y = t.m_y - padding;
214
+                    w = t.m_width + t.m_border * 2 + padding * 2;
215
+                    h = t.m_height + t.m_border * 2 + padding * 2;
216
                 } else {
216
                 } else {
217
                     x = cx;
217
                     x = cx;
218
                     y = cy;
218
                     y = cy;