[geany/geany] b46e18: Move the popup 1px further so it isn't below mouse pointer
Jiří Techet
git-noreply at xxxxx
Thu Feb 25 23:05:22 UTC 2016
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Thu, 25 Feb 2016 23:05:22 UTC
Commit: b46e183cbc689ba7dd69a21d3575c863d762eea5
https://github.com/geany/geany/commit/b46e183cbc689ba7dd69a21d3575c863d762eea5
Log Message:
-----------
Move the popup 1px further so it isn't below mouse pointer
Otherwise the mouse pointer highlights a wrong value if the popup is
large enough to extend above the mouse pointer.
Modified Paths:
--------------
src/symbols.c
Modified: src/symbols.c
14 lines changed, 8 insertions(+), 6 deletions(-)
===================================================================
@@ -1927,17 +1927,19 @@ static void goto_popup_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *
/* put on one size of the X position, but within the monitor */
if (gtk_widget_get_direction(GTK_WIDGET(menu)) == GTK_TEXT_DIR_RTL)
{
- if (*x - req.width >= monitor.x)
- *x -= req.width;
+ if (*x - req.width - 1 >= monitor.x)
+ *x -= req.width + 1;
else if (*x + req.width > monitor.x + monitor.width)
*x = monitor.x;
+ else
+ *x += 1;
}
else
{
- if (*x + req.width <= monitor.x + monitor.width)
- *x = MAX(monitor.x, *x);
- else if (*x - req.width >= monitor.x)
- *x -= req.width;
+ if (*x + req.width + 1 <= monitor.x + monitor.width)
+ *x = MAX(monitor.x, *x + 1);
+ else if (*x - req.width - 1 >= monitor.x)
+ *x -= req.width + 1;
else
*x = monitor.x + MAX(0, monitor.width - req.width);
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list