[vlc-devel] commit: XCB: develop resize handling ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Apr 25 21:10:41 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 25 22:01:32 2009 +0300| [4e8458875919e1534443eefa49613160018fd66f] | committer: Rémi Denis-Courmont
XCB: develop resize handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e8458875919e1534443eefa49613160018fd66f
---
modules/video_output/xcb/events.c | 21 ---------------------
modules/video_output/xcb/x11.c | 21 +++++++++++++++++++++
modules/video_output/xcb/xcb_vlc.h | 4 ++++
3 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/modules/video_output/xcb/events.c b/modules/video_output/xcb/events.c
index 4ed2b41..b279da4 100644
--- a/modules/video_output/xcb/events.c
+++ b/modules/video_output/xcb/events.c
@@ -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.
*/
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 6679b18..d0e8af3 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -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);
+}
diff --git a/modules/video_output/xcb/xcb_vlc.h b/modules/video_output/xcb/xcb_vlc.h
index 113824b..ee4490c 100644
--- a/modules/video_output/xcb/xcb_vlc.h
+++ b/modules/video_output/xcb/xcb_vlc.h
@@ -29,7 +29,11 @@
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 *);
More information about the vlc-devel
mailing list