Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
thunar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pratik Karki
thunar
Commits
805ec1d9
Commit
805ec1d9
authored
9 years ago
by
Jonas Kümmerlin
Committed by
Andre Miranda
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Sort of fix mouse gestures
They are still unreliable, but at least it doesn't print warnings anymore.
parent
81e645d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
thunar/thunar-abstract-icon-view.c
+7
-14
7 additions, 14 deletions
thunar/thunar-abstract-icon-view.c
with
7 additions
and
14 deletions
thunar/thunar-abstract-icon-view.c
+
7
−
14
View file @
805ec1d9
...
@@ -77,8 +77,8 @@ static gboolean thunar_abstract_icon_view_button_press_event (ExoIconView
...
@@ -77,8 +77,8 @@ static gboolean thunar_abstract_icon_view_button_press_event (ExoIconView
static
gboolean
thunar_abstract_icon_view_button_release_event
(
ExoIconView
*
view
,
static
gboolean
thunar_abstract_icon_view_button_release_event
(
ExoIconView
*
view
,
GdkEventButton
*
event
,
GdkEventButton
*
event
,
ThunarAbstractIconView
*
abstract_icon_view
);
ThunarAbstractIconView
*
abstract_icon_view
);
static
gboolean
thunar_abstract_icon_view_
expose_event
(
ExoIconView
*
view
,
static
gboolean
thunar_abstract_icon_view_
draw
(
ExoIconView
*
view
,
GdkEventExpose
*
event
,
cairo_t
*
cr
,
ThunarAbstractIconView
*
abstract_icon_view
);
ThunarAbstractIconView
*
abstract_icon_view
);
static
gboolean
thunar_abstract_icon_view_key_press_event
(
ExoIconView
*
view
,
static
gboolean
thunar_abstract_icon_view_key_press_event
(
ExoIconView
*
view
,
GdkEventKey
*
event
,
GdkEventKey
*
event
,
...
@@ -558,8 +558,8 @@ thunar_abstract_icon_view_button_press_event (ExoIconView *view,
...
@@ -558,8 +558,8 @@ thunar_abstract_icon_view_button_press_event (ExoIconView *view,
{
{
abstract_icon_view
->
priv
->
gesture_start_x
=
abstract_icon_view
->
priv
->
gesture_current_x
=
event
->
x
;
abstract_icon_view
->
priv
->
gesture_start_x
=
abstract_icon_view
->
priv
->
gesture_current_x
=
event
->
x
;
abstract_icon_view
->
priv
->
gesture_start_y
=
abstract_icon_view
->
priv
->
gesture_current_y
=
event
->
y
;
abstract_icon_view
->
priv
->
gesture_start_y
=
abstract_icon_view
->
priv
->
gesture_current_y
=
event
->
y
;
abstract_icon_view
->
priv
->
gesture_expose_id
=
g_signal_connect_after
(
G_OBJECT
(
view
),
"
expose-event
"
,
abstract_icon_view
->
priv
->
gesture_expose_id
=
g_signal_connect_after
(
G_OBJECT
(
view
),
"
draw
"
,
G_CALLBACK
(
thunar_abstract_icon_view_
expose_event
),
G_CALLBACK
(
thunar_abstract_icon_view_
draw
),
G_OBJECT
(
abstract_icon_view
));
G_OBJECT
(
abstract_icon_view
));
abstract_icon_view
->
priv
->
gesture_motion_id
=
g_signal_connect
(
G_OBJECT
(
view
),
"motion-notify-event"
,
abstract_icon_view
->
priv
->
gesture_motion_id
=
g_signal_connect
(
G_OBJECT
(
view
),
"motion-notify-event"
,
G_CALLBACK
(
thunar_abstract_icon_view_motion_notify_event
),
G_CALLBACK
(
thunar_abstract_icon_view_motion_notify_event
),
...
@@ -617,16 +617,15 @@ thunar_abstract_icon_view_button_release_event (ExoIconView *view,
...
@@ -617,16 +617,15 @@ thunar_abstract_icon_view_button_release_event (ExoIconView *view,
static
gboolean
static
gboolean
thunar_abstract_icon_view_
expose_event
(
ExoIconView
*
view
,
thunar_abstract_icon_view_
draw
(
ExoIconView
*
view
,
GdkEventExpose
*
event
,
cairo_t
*
cr
,
ThunarAbstractIconView
*
abstract_icon_view
)
ThunarAbstractIconView
*
abstract_icon_view
)
{
{
GtkIconSet
*
stock_icon_set
;
GtkIconSet
*
stock_icon_set
;
GtkAction
*
action
=
NULL
;
GtkAction
*
action
=
NULL
;
GdkPixbuf
*
stock_icon
=
NULL
;
GdkPixbuf
*
stock_icon
=
NULL
;
gchar
*
stock_id
;
gchar
*
stock_id
;
GdkColor
bg
;
GdkColor
bg
;
cairo_t
*
cr
;
gint
x
,
y
;
gint
x
,
y
;
_thunar_return_val_if_fail
(
EXO_IS_ICON_VIEW
(
view
),
FALSE
);
_thunar_return_val_if_fail
(
EXO_IS_ICON_VIEW
(
view
),
FALSE
);
...
@@ -635,9 +634,6 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
...
@@ -635,9 +634,6 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
_thunar_return_val_if_fail
(
abstract_icon_view
->
priv
->
gesture_motion_id
>
0
,
FALSE
);
_thunar_return_val_if_fail
(
abstract_icon_view
->
priv
->
gesture_motion_id
>
0
,
FALSE
);
_thunar_return_val_if_fail
(
abstract_icon_view
->
priv
->
gesture_release_id
>
0
,
FALSE
);
_thunar_return_val_if_fail
(
abstract_icon_view
->
priv
->
gesture_release_id
>
0
,
FALSE
);
/* create the cairo context (is already clipped) */
cr
=
gdk_cairo_create
(
event
->
window
);
/* shade the abstract_icon view content while performing mouse gestures */
/* shade the abstract_icon view content while performing mouse gestures */
bg
=
gtk_widget_get_style
(
GTK_WIDGET
(
view
))
->
base
[
GTK_STATE_NORMAL
];
bg
=
gtk_widget_get_style
(
GTK_WIDGET
(
view
))
->
base
[
GTK_STATE_NORMAL
];
cairo_set_source_rgba
(
cr
,
bg
.
red
/
65535
.
0
,
bg
.
green
/
65535
.
0
,
bg
.
blue
/
65535
.
0
,
0
.
7
);
cairo_set_source_rgba
(
cr
,
bg
.
red
/
65535
.
0
,
bg
.
green
/
65535
.
0
,
bg
.
blue
/
65535
.
0
,
0
.
7
);
...
@@ -682,9 +678,6 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
...
@@ -682,9 +678,6 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
g_free
(
stock_id
);
g_free
(
stock_id
);
}
}
/* destroy context */
cairo_destroy
(
cr
);
return
FALSE
;
return
FALSE
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment