Author: kelnos
Date: 2006-11-27 00:23:16 +0000 (Mon, 27 Nov 2006)
New Revision: 23969
Modified:
xfmedia/trunk/src/mainwin-callbacks.c
xfmedia/trunk/src/mainwin.c
Log:
fix fullscreen control window positioning
Modified: xfmedia/trunk/src/mainwin-callbacks.c
===================================================================
--- xfmedia/trunk/src/mainwin-callbacks.c 2006-11-26 22:01:33 UTC (rev
23968)
+++ xfmedia/trunk/src/mainwin-callbacks.c 2006-11-27 00:23:16 UTC (rev
23969)
@@ -2013,28 +2013,28 @@
if(!xfmedia_video_window_get_fullscreen(XFMEDIA_VIDEO_WINDOW(mwin->video_window)))
return FALSE;
-
+
gscreen = gtk_widget_get_screen(mwin->window);
monitor = gdk_screen_get_monitor_at_window(gscreen, w->window);
gdk_screen_get_monitor_geometry(gscreen, monitor, &rect);
- /*
- TRACE("entering: fscontrols: %s, evt->y: %d, rect.height: %d",
+#if 0
+ TRACE("entering: fscontrols: %s, evt->_rootx: %d, evt->y_root: %d,
rect.height: %d",
GTK_WIDGET_VISIBLE(mwin->fs_controls)?"visible":"hidden",
- (gint)evt->y, rect.height);
- */
+ (gint)evt->x_root, (gint)evt->y_root, rect.height);
+ DBG("fs window geom: %dx%d+%d+%d", w->allocation.width,
w->allocation.height,
+ w->allocation.x, w->allocation.y);
+#endif
- if(!GTK_WIDGET_VISIBLE(mwin->fs_controls) && evt->y >= rect.height - 3) {
- gtk_window_set_transient_for(GTK_WINDOW(mwin->fs_controls),
- GTK_WINDOW(mwin->video_window));
-
+ if(!GTK_WIDGET_VISIBLE(mwin->fs_controls)
+ && evt->y_root >= rect.y + rect.height - 6)
+ {
gtk_widget_set_size_request(mwin->fs_controls, rect.width, -1);
- /*gtk_window_set_keep_above(GTK_WINDOW(mwin->fs_controls), TRUE);*/
gtk_widget_show(mwin->fs_controls);
gtk_window_move(GTK_WINDOW(mwin->fs_controls), 0,
- rect.height - mwin->fs_controls->allocation.height);
+ rect.y + rect.height - mwin->fs_controls->allocation.height);
} else if(GTK_WIDGET_VISIBLE(mwin->fs_controls)
- && evt->y <= rect.height - mwin->fs_controls->allocation.height -
3)
+ && evt->y_root <= rect.y + rect.height -
mwin->fs_controls->allocation.height - 6)
{
gtk_widget_hide(mwin->fs_controls);
}
Modified: xfmedia/trunk/src/mainwin.c
===================================================================
--- xfmedia/trunk/src/mainwin.c 2006-11-26 22:01:33 UTC (rev 23968)
+++ xfmedia/trunk/src/mainwin.c 2006-11-27 00:23:16 UTC (rev 23969)
@@ -274,11 +274,10 @@
gint iw, ih;
guint opacity;
- mwin->fs_controls = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ mwin->fs_controls = gtk_window_new(GTK_WINDOW_POPUP);
gtk_window_set_title(GTK_WINDOW(mwin->fs_controls),
"xfmedia-fullscreen-control-window");
gtk_window_set_decorated(GTK_WINDOW(mwin->fs_controls), FALSE);
- gtk_window_set_keep_above(GTK_WINDOW(mwin->fs_controls), TRUE);
gtk_container_set_border_width(GTK_CONTAINER(mwin->fs_controls), BORDER/2);
tophbox = gtk_hbox_new(FALSE, BORDER);
@@ -474,8 +473,6 @@
mwin->xfx = xfx;
g_signal_connect(G_OBJECT(xfx), "button-press-event",
G_CALLBACK(xfmedia_vwin_button_press_cb), mwin);
- g_signal_connect(G_OBJECT(xfx), "motion-notify-event",
- G_CALLBACK(xfmedia_vwin_motion_notify_cb), mwin);
g_signal_connect(G_OBJECT(xfx), "stream-ended",
G_CALLBACK(xfmedia_xfmedia_xine_stream_ended_cb), mwin);
g_signal_connect(G_OBJECT(xfx), "ui-message",
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits