mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
libsysprof-gtk: don't reset selection when clicking on info
This commit is contained in:
@ -130,21 +130,23 @@ sysprof_tracks_view_drag_end_cb (SysprofTracksView *self,
|
|||||||
double offset_y,
|
double offset_y,
|
||||||
GtkGestureDrag *drag)
|
GtkGestureDrag *drag)
|
||||||
{
|
{
|
||||||
|
int base_x;
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_TRACKS_VIEW (self));
|
g_assert (SYSPROF_IS_TRACKS_VIEW (self));
|
||||||
g_assert (GTK_IS_GESTURE_DRAG (drag));
|
g_assert (GTK_IS_GESTURE_DRAG (drag));
|
||||||
|
|
||||||
if (self->session == NULL)
|
if (self->session == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
base_x = gtk_widget_get_width (self->top_left);
|
||||||
|
|
||||||
if (self->drag_offset_x != .0)
|
if (self->drag_offset_x != .0)
|
||||||
{
|
{
|
||||||
graphene_rect_t selection;
|
graphene_rect_t selection;
|
||||||
graphene_rect_t area;
|
graphene_rect_t area;
|
||||||
int base_x;
|
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
base_x = gtk_widget_get_width (self->top_left);
|
|
||||||
width = gtk_widget_get_width (GTK_WIDGET (self)) - base_x;
|
width = gtk_widget_get_width (GTK_WIDGET (self)) - base_x;
|
||||||
height = gtk_widget_get_height (GTK_WIDGET (self));
|
height = gtk_widget_get_height (GTK_WIDGET (self));
|
||||||
|
|
||||||
@ -169,7 +171,7 @@ sysprof_tracks_view_drag_end_cb (SysprofTracksView *self,
|
|||||||
sysprof_session_select_time (self->session, &to_select);
|
sysprof_session_select_time (self->session, &to_select);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (self->drag_start_x >= base_x)
|
||||||
{
|
{
|
||||||
sysprof_session_select_time (self->session, NULL);
|
sysprof_session_select_time (self->session, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user