summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-06-03 19:30:56 +0000
committerphintuka <phintuka>2008-06-03 19:30:56 +0000
commitf5648839fe09440ff17cce3560b0cab12b0673f2 (patch)
treecfe25fc6ce2c51b1e9c9a2461210ba59b743dd5a
parentbc7d4c04973351da1fd244cffd0971f06e21a438 (diff)
downloadxineliboutput-f5648839fe09440ff17cce3560b0cab12b0673f2.tar.gz
xineliboutput-f5648839fe09440ff17cce3560b0cab12b0673f2.tar.bz2
Moved setting XSizeHints to separate function.
Size is now updated when switching to fullscreen mode.
-rw-r--r--xine_sxfe_frontend.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 085cedd6..bfe59c0b 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.43 2008-06-03 14:24:36 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.44 2008-06-03 19:30:56 phintuka Exp $
*
*/
@@ -234,6 +234,17 @@ static void fe_dest_size_cb (void *data,
video_width, video_height);
}
+static void set_fs_size_hint(sxfe_t *this)
+{
+ XSizeHints hint;
+ hint.flags = USSize | USPosition | PPosition | PSize;
+ hint.x = this->xinerama_x;
+ hint.y = this->xinerama_y;
+ hint.width = this->width;
+ hint.height = this->height;
+ XSetNormalHints(this->display, this->window[1], &hint);
+}
+
static void set_fullscreen_props(sxfe_t *this)
{
XEvent ev;
@@ -241,6 +252,8 @@ static void set_fullscreen_props(sxfe_t *this)
if(this->window_id > 0)
return;
+ set_fs_size_hint(this);
+
if(this->atom_state == None) {
this->atom_win_layer = XInternAtom(this->display, "_WIN_LAYER", False);
this->atom_state = XInternAtom(this->display, "_NET_WM_STATE", False);
@@ -854,7 +867,6 @@ static int sxfe_display_open(frontend_t *this_gen, int width, int height, int fu
sxfe_t *this = (sxfe_t*)this_gen;
MWMHints mwmhints;
- XSizeHints hint;
double res_h, res_v, aspect_diff;
if(this->display)
@@ -972,13 +984,6 @@ static int sxfe_display_open(frontend_t *this_gen, int width, int height, int fu
0, 0, 0);
}
- hint.flags = USSize | USPosition | PPosition | PSize;
- hint.x = 0;
- hint.y = 0;
- hint.width = DisplayWidth(this->display, this->screen);
- hint.height = DisplayHeight(this->display, this->screen);
- XSetNormalHints(this->display, this->window[1], &hint);
-
if(this->window_id <= 0) {
/* full-screen window */
set_fullscreen_props(this);