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);