From 9d1d6d55a705e16ebdff1451caabea3b7e97bd27 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Wed, 5 Nov 2003 21:51:53 +0000 Subject: XShm crashes with xinimin, when the callbacks return without initializing the values, because "running" is set too late CVS patchset: 5696 CVS date: 2003/11/05 21:51:53 --- doc/hackersguide/library.sgml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/hackersguide/library.sgml b/doc/hackersguide/library.sgml index 6b68c877d..63e550e3d 100644 --- a/doc/hackersguide/library.sgml +++ b/doc/hackersguide/library.sgml @@ -104,16 +104,12 @@ static Window window[2]; static int xpos, ypos, width, height, fullscreen; static double pixel_aspect; -static int running = 0; +static int running = 1; /* this will be called by xine, if it wants to know the target size of a frame */ static void dest_size_cb(void *data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect) { - - if(!running) - return; - *dest_width = width; *dest_height = height; *dest_pixel_aspect = pixel_aspect; @@ -124,9 +120,6 @@ static void frame_output_cb(void *data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y) { - if(!running) - return; - *dest_x = 0; *dest_y = 0; *win_x = xpos; @@ -262,8 +255,6 @@ int main(int argc, char **argv) { return 1; } - running = 1; - while (running) { XEvent xevent; -- cgit v1.2.3