]> git.sesse.net Git - vlc/commitdiff
XCB: develop resize handling
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 25 Apr 2009 19:01:32 +0000 (22:01 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 25 Apr 2009 19:10:36 +0000 (22:10 +0300)
modules/video_output/xcb/events.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xcb_vlc.h

index 4ed2b41b87b2f400fdc792469dd02a06c6c7e1aa..b279da40474c44372044c1863040bb4986fb7e3d 100644 (file)
@@ -91,27 +91,6 @@ static void HandleMotionNotify (vout_thread_t *vout,
     var_SetInteger (vout, "mouse-y", v);
 }
 
-static void
-HandleParentStructure (vout_thread_t *vout, xcb_connection_t *conn,
-                       xcb_window_t xid, xcb_configure_notify_event_t *ev)
-{
-    unsigned width, height, x, y;
-
-    vout_PlacePicture (vout, ev->width, ev->height, &x, &y, &width, &height);
-    if (width != vout->fmt_out.i_visible_width
-     || height != vout->fmt_out.i_visible_height)
-    {
-        vout->i_changes |= VOUT_SIZE_CHANGE;
-        return; /* vout will be reinitialized */
-    }
-
-    /* Move the picture within the window */
-    const uint32_t values[] = { x, y, };
-    xcb_configure_window (conn, xid,
-                          XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y,
-                          values);
-}
-
 /**
  * Process an X11 event.
  */
index 6679b18dfeed1f65c78b1d73de13801debd3e4e3..d0e8af3b8365ea91ebfb45fe7b6ef23807117259 100644 (file)
@@ -403,3 +403,24 @@ static int Manage (vout_thread_t *vout)
     }
     return VLC_SUCCESS;
 }
+
+void
+HandleParentStructure (vout_thread_t *vout, xcb_connection_t *conn,
+                       xcb_window_t xid, xcb_configure_notify_event_t *ev)
+{
+    unsigned width, height, x, y;
+
+    vout_PlacePicture (vout, ev->width, ev->height, &x, &y, &width, &height);
+    if (width != vout->fmt_out.i_visible_width
+     || height != vout->fmt_out.i_visible_height)
+    {
+        vout->i_changes |= VOUT_SIZE_CHANGE;
+        return; /* vout will be reinitialized */
+    }
+
+    /* Move the picture within the window */
+    const uint32_t values[] = { x, y, };
+    xcb_configure_window (conn, xid,
+                          XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y,
+                          values);
+}
index 113824b9d59e66ee233c74a77e4d8365c0bc8f24..ee4490c31c3ec3d8e34248cb25994bf7e2590727 100644 (file)
 int CheckError (vout_thread_t *, const char *str, xcb_void_cookie_t);
 int ProcessEvent (vout_thread_t *, xcb_connection_t *, xcb_window_t,
                   xcb_generic_event_t *);
+void HandleParentStructure (vout_thread_t *vout, xcb_connection_t *conn,
+                          xcb_window_t xid, xcb_configure_notify_event_t *ev);
 
+
+/* keys.c */
 typedef struct key_handler_t key_handler_t;
 key_handler_t *CreateKeyHandler (vlc_object_t *, xcb_connection_t *);
 void DestroyKeyHandler (key_handler_t *);