diff options
author | zmike <michael.blumenkrantz@gmail.com> | 2014-04-22 09:29:49 -0400 |
---|---|---|
committer | zmike <michael.blumenkrantz@gmail.com> | 2014-04-22 09:31:41 -0400 |
commit | cca19389cc803ceb382adcd3d32ff3cf55011fb7 (patch) | |
tree | d1001a3bab03c9c95fbdf9198991401b5c456262 | |
parent | a614afd5476aa3ca1cd2414c75ca7734aebd6f45 (diff) | |
download | elementary-cca19389cc803ceb382adcd3d32ff3cf55011fb7.tar.gz |
tooltips position more accurately in X in xinerama
elm_win_screen_size_get() is broken for this use case since the tooltip actually needs the full xinerama screen geometry, which is the geometry of the root window and NOT the current screen
@fix
-rw-r--r-- | src/lib/els_tooltip.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index bfbb40c26..bc24676bd 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -393,7 +393,16 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt) TTDBG("TTSIZE: tw=%d,th=%d,ominw=%d,ominh=%d\n", tw, th, ominw, ominh); if (tt->tt_win) - elm_win_screen_size_get(elm_widget_top_get(tt->owner), NULL, NULL, &cw, &ch); + { +#ifdef HAVE_ELEMENTARY_X + Evas_Object *win = elm_widget_top_get(tt->owner); + Ecore_X_Window xwin = elm_win_xwindow_get(win); + if (xwin) + ecore_x_window_size_get(ecore_x_window_root_get(xwin), &cw, &ch); +#endif + if (!cw) + elm_win_screen_size_get(elm_widget_top_get(tt->owner), NULL, NULL, &cw, &ch); + } if (!cw) evas_output_size_get(tt->tt_evas ?: tt->evas, &cw, &ch); TTDBG("SCREEN: cw=%d,ch=%d\n", cw, ch); |