[evince/wip/gpoo/gtk4-rebase-port: 52/72] ev-view: move to name based cursor API
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/gpoo/gtk4-rebase-port: 52/72] ev-view: move to name based cursor API
- Date: Mon, 21 Mar 2022 05:37:34 +0000 (UTC)
commit 36d05c5d23efac98f9242bbdbb3966aec25f9693
Author: Qiu Wenbo <qiuwenbo kylinos com cn>
Date: Wed Dec 8 11:18:15 2021 +0800
ev-view: move to name based cursor API
Signed-off-by: Qiu Wenbo <qiuwenbo kylinos com cn>
libview/ev-view.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index b12035c4d..f6000735e 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -9924,21 +9924,14 @@ ev_view_copy_link_address (EvView *view,
static void
ev_view_set_cursor (EvView *view, EvViewCursor new_cursor)
{
- GdkCursor *cursor = NULL;
- GtkWidget *widget;
-
if (view->cursor == new_cursor) {
return;
}
view->cursor = new_cursor;
- widget = GTK_WIDGET (gtk_widget_get_native (GTK_WIDGET (view)));
- cursor = ev_view_cursor_new (new_cursor);
- gtk_widget_set_cursor (widget, cursor);
- gdk_display_flush (gtk_widget_get_display (widget));
- if (cursor)
- g_object_unref (cursor);
+ gtk_widget_set_cursor_from_name (GTK_WIDGET (view),
+ ev_view_cursor_name (new_cursor));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]