Commit 0c8724f
committed
Fix filmstrip: keyboard shortcuts apply to wrong image
Fixes #19775
Problem:
When the mouse cursor is over a thumbnail in the filmstrip (especially
over overlay elements like stars or reject button), keyboard shortcuts
for rating, color labels, etc. were being applied to the currently open
image in darkroom instead of the image under the cursor.
Additionally, fast transitions between overlay elements of different
thumbnails didn't update mouse_over_id correctly.
Root cause:
Keyboard events trigger spurious GDK_LEAVE_NOTIFY events with
GDK_NOTIFY_ANCESTOR detail in GTK. The thumbnail's leave event handlers
were resetting mouse_over_id to NO_IMGID when receiving these events,
causing dt_act_on_get_images() to fall back to using active_images
instead of the hovered image.
before updating mouse_over_id, which prevented updates during fast
transitions between overlay elements of different thumbnails.
Solution:
1. Remove mouse_over_id resets from thumbnail-level leave handlers.
The proper place to reset mouse_over_id is in thumbtable's leave
handler (_event_leave_notify in thumbtable.c), which correctly
distinguishes between leaving the thumbnail for another thumbnail
(GDK_NOTIFY_INFERIOR) and actually leaving the thumbtable area.
ensure mouse_over_id is updated on every enter event, enabling
proper tracking during fast mouse movements between thumbnails.
3. Add mouse_over_id update to _event_btn_enter_leave for overlay
buttons (reject, color labels, etc.) to handle transitions to
these elements.
4. Add proper darktable.control->element reset in leave handler for
reject button to ensure hover state is cleared correctly.
Changes:
_event_image_enter_leave, and _event_star_enter
- Added mouse_over_id update to _event_btn_enter_leave enter handler
- Added darktable.control->element reset to _event_btn_enter_leave
leave handler for reject button
- Removed _event_main_leave function and its signal connection entirely
as it served no purpose after removing the mouse_over_id reset1 parent 0f6ea12 commit 0c8724f
1 file changed
+19
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
| 1242 | + | |
| 1243 | + | |
1250 | 1244 | | |
1251 | 1245 | | |
1252 | 1246 | | |
| |||
1261 | 1255 | | |
1262 | 1256 | | |
1263 | 1257 | | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
| 1258 | + | |
1267 | 1259 | | |
1268 | 1260 | | |
1269 | 1261 | | |
| |||
1277 | 1269 | | |
1278 | 1270 | | |
1279 | 1271 | | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | 1272 | | |
1293 | 1273 | | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1294 | 1282 | | |
1295 | 1283 | | |
1296 | 1284 | | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1297 | 1291 | | |
1298 | 1292 | | |
1299 | 1293 | | |
| |||
1303 | 1297 | | |
1304 | 1298 | | |
1305 | 1299 | | |
1306 | | - | |
| 1300 | + | |
| 1301 | + | |
1307 | 1302 | | |
1308 | 1303 | | |
1309 | 1304 | | |
| |||
1328 | 1323 | | |
1329 | 1324 | | |
1330 | 1325 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | 1326 | | |
1336 | 1327 | | |
1337 | 1328 | | |
| |||
1342 | 1333 | | |
1343 | 1334 | | |
1344 | 1335 | | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | 1336 | | |
1355 | 1337 | | |
1356 | 1338 | | |
| |||
1422 | 1404 | | |
1423 | 1405 | | |
1424 | 1406 | | |
1425 | | - | |
1426 | | - | |
1427 | 1407 | | |
1428 | 1408 | | |
1429 | 1409 | | |
| |||
0 commit comments