@@ -126,14 +126,14 @@ namespace cycfi::elements
126
126
return true ;
127
127
128
128
bool r = tracker::cursor (ctx, p, status);
129
- auto inner = ctx.bounds .inset (resize_margin, resize_margin);
130
- if (ctx.enabled && is_enabled () && ctx.bounds .includes (p) && !inner.includes (p))
129
+ if (ctx.enabled && is_enabled ())
131
130
{
132
131
auto const & b = ctx.bounds ;
133
132
bool l_resize = false ;
134
133
bool r_resize = false ;
135
134
bool t_resize = false ;
136
135
bool b_resize = false ;
136
+
137
137
if (p.x >= b.left && p.x < b.left + resize_margin)
138
138
l_resize = true ;
139
139
else if (p.x > b.right - resize_margin && p.x <= b.right )
@@ -195,20 +195,16 @@ namespace cycfi::elements
195
195
auto state = get_state ();
196
196
if (state)
197
197
{
198
- auto inner = ctx.bounds .inset (resize_margin, resize_margin);
199
- if (ctx.bounds .includes (btn.pos ) && !inner.includes (btn.pos ))
200
- {
201
- auto const & b = ctx.bounds ;
202
- if (btn.pos .x >= b.left && btn.pos .x < b.left + resize_margin)
203
- state->_handle = window_resizer_tracker_info::left;
204
- else if (btn.pos .x > b.right - resize_margin && btn.pos .x <= b.right )
205
- state->_handle = window_resizer_tracker_info::right;
206
-
207
- if (btn.pos .y >= b.top && btn.pos .y < b.top + resize_margin)
208
- state->_handle |= window_resizer_tracker_info::top;
209
- else if (btn.pos .y > b.bottom - resize_margin && btn.pos .y <= b.bottom )
210
- state->_handle |= window_resizer_tracker_info::bottom;
211
- }
198
+ auto const & b = ctx.bounds ;
199
+ if (btn.pos .x >= b.left && btn.pos .x < b.left + resize_margin)
200
+ state->_handle = window_resizer_tracker_info::left;
201
+ else if (btn.pos .x > b.right - resize_margin && btn.pos .x <= b.right )
202
+ state->_handle = window_resizer_tracker_info::right;
203
+
204
+ if (btn.pos .y >= b.top && btn.pos .y < b.top + resize_margin)
205
+ state->_handle |= window_resizer_tracker_info::top;
206
+ else if (btn.pos .y > b.bottom - resize_margin && btn.pos .y <= b.bottom )
207
+ state->_handle |= window_resizer_tracker_info::bottom;
212
208
}
213
209
return r;
214
210
}
0 commit comments