Skip to content

Commit 9bc115f

Browse files
committed
tagging: Add some consts.
1 parent ad18503 commit 9bc115f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libs/tagging.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3418,17 +3418,17 @@ static void _lib_tagging_tag_show(dt_action_t *action)
34183418
}
34193419

34203420
d->floating_tag_imgs = dt_act_on_get_images(FALSE, TRUE, FALSE);
3421-
gint x, y;
3422-
gint px, py, w, h;
3421+
gint px = 0, py =0;
34233422
GtkWidget *window = dt_ui_main_window(darktable.gui->ui);
34243423
GtkWidget *center = dt_ui_center(darktable.gui->ui);
34253424
gdk_window_get_origin(gtk_widget_get_window(center), &px, &py);
34263425

3427-
w = gdk_window_get_width(gtk_widget_get_window(center));
3428-
h = gdk_window_get_height(gtk_widget_get_window(center));
3426+
const gint w = gdk_window_get_width(gtk_widget_get_window(center));
3427+
const gint h = gdk_window_get_height(gtk_widget_get_window(center));
3428+
3429+
const gint x = px + 0.5 * (w - FLOATING_ENTRY_WIDTH);
3430+
const gint y = py + h - 50;
34293431

3430-
x = px + 0.5 * (w - FLOATING_ENTRY_WIDTH);
3431-
y = py + h - 50;
34323432

34333433
/* put the floating box at the mouse pointer */
34343434
// gint pointerx, pointery;

0 commit comments

Comments
 (0)