1
1
#include "event.h"
2
+ #include "bar_manager.h"
3
+ #include "custom_events.h"
2
4
#include "hotload.h"
3
5
4
6
extern struct bar_manager g_bar_manager ;
@@ -197,8 +199,18 @@ static void event_mouse_exited(void* context) {
197
199
popup_target -> mouse_over = true;
198
200
}
199
201
else {
200
- popup -> mouse_over = false;
201
202
bar_target -> mouse_over = true;
203
+ if (popup ) {
204
+ popup -> mouse_over = false;
205
+ bool has_complex_mask
206
+ = popup -> host -> update_mask & (UPDATE_MOUSE_EXITED
207
+ | UPDATE_EXITED_GLOBAL );
208
+ if (has_complex_mask
209
+ && bar_manager_get_item_by_point (& g_bar_manager , point , NULL )
210
+ != popup -> host ) {
211
+ bar_manager_handle_mouse_exited (& g_bar_manager , popup -> host );
212
+ }
213
+ }
202
214
}
203
215
}
204
216
return ;
@@ -209,14 +221,13 @@ static void event_mouse_exited(void* context) {
209
221
wid ,
210
222
& window );
211
223
212
- if (bar_item ) {
213
- if (!(bar_item -> update_mask & UPDATE_EXITED_GLOBAL )
214
- || (bar_manager_get_bar_by_point (& g_bar_manager , point )
215
- && bar_manager_get_popup_by_point (& g_bar_manager , point )
216
- != & bar_item -> popup )) {
217
- bar_manager_handle_mouse_exited (& g_bar_manager , bar_item );
218
- }
224
+ if (bar_item
225
+ && bar_item -> update_mask & UPDATE_EXITED_GLOBAL
226
+ && bar_manager_get_popup_by_point (& g_bar_manager , point )
227
+ == & bar_item -> popup ) {
228
+ return ;
219
229
}
230
+ if (bar_item ) bar_manager_handle_mouse_exited (& g_bar_manager , bar_item );
220
231
}
221
232
222
233
#define SCROLL_TIMEOUT 150000000
0 commit comments