[bijiben] Hide cursor while selection
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Hide cursor while selection
- Date: Tue, 19 Aug 2014 22:38:55 +0000 (UTC)
commit 1d5ce7f46b67e17ffe2c93ccdd6f7e4eb6f2c12a
Author: Pierre-Yves Luyten <py luyten fr>
Date: Wed Aug 20 00:34:31 2014 +0200
Hide cursor while selection
src/bjb-editor-toolbar.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/bjb-editor-toolbar.c b/src/bjb-editor-toolbar.c
index d539157..00d3469 100644
--- a/src/bjb-editor-toolbar.c
+++ b/src/bjb-editor-toolbar.c
@@ -148,6 +148,9 @@ editor_toolbar_align (BjbEditorToolbar *self, GdkEvent *event)
gint x_alignment, y_alignment;
BjbEditorToolbarPrivate *priv = self->priv;
cairo_rectangle_int_t rect;
+ GtkWidget *top;
+ GdkDisplay *display;
+ GdkCursor* cursor;
x_alignment = event->button.x;// + EDITOR_TOOLBAR_X_OFFSET;
y_alignment = event->button.y + EDITOR_TOOLBAR_Y_OFFSET;
@@ -161,6 +164,17 @@ editor_toolbar_align (BjbEditorToolbar *self, GdkEvent *event)
rect.height = 1;
gtk_popover_set_pointing_to (GTK_POPOVER (priv->widget), &rect);
+
+ /* Hide the cursor from the main view */
+ top = gtk_widget_get_toplevel (priv->widget);
+
+ if (gtk_widget_is_toplevel (top))
+ {
+ display = gdk_screen_get_display (gtk_window_get_screen (GTK_WINDOW (top)));
+ cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
+ gdk_window_set_cursor (gtk_widget_get_window (biji_note_obj_get_editor (priv->note)),
+ cursor);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]