[Mplayerplug-in-cvs] mplayerplug-in/Source plugin-threads.cpp,1.132,1.133 plugin-ui.cpp,1.105,1.106
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2004-12-14 16:25:53
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5696/Source Modified Files: plugin-threads.cpp plugin-ui.cpp plugin.cpp Log Message: 2.75 prep Index: plugin-ui.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-ui.cpp,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** plugin-ui.cpp 13 Dec 2004 21:24:03 -0000 1.105 --- plugin-ui.cpp 14 Dec 2004 16:25:42 -0000 1.106 *************** *** 914,918 **** height = SMALL_BUTTON_HEIGHT; - gtk_widget_set_events(instance->gtkwidget, GDK_KEY_PRESS_MASK); #ifdef GTK2_ENABLED g_signal_connect(G_OBJECT(instance->gtkwidget), --- 914,917 ---- *************** *** 1377,1383 **** { nsPluginInstance *instance; ! if (DEBUG > 1) ! printf("in drawMediaProgress method\n"); instance = (nsPluginInstance *) data; --- 1376,1382 ---- { nsPluginInstance *instance; ! if (DEBUG > 1) ! printf("in updatefullscreen method\n"); instance = (nsPluginInstance *) data; Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** plugin-threads.cpp 13 Dec 2004 21:24:03 -0000 1.132 --- plugin-threads.cpp 14 Dec 2004 16:25:42 -0000 1.133 *************** *** 623,627 **** char url_copy[1024]; int c; ! #define TRYAGAIN_FALSE 0 #define TRYAGAIN_TRUE 1 --- 623,629 ---- char url_copy[1024]; int c; ! #ifdef GTK_ENABLED ! int fsupdated = 0; ! #endif #define TRYAGAIN_FALSE 0 #define TRYAGAIN_TRUE 1 *************** *** 817,823 **** #endif } - #ifdef GTK_ENABLED - g_idle_add(gtkgui_updatefullscreen, local_td->instance); - #endif if (DEBUG) --- 819,822 ---- *************** *** 930,933 **** --- 929,938 ---- pthread_mutex_unlock(&(local_td->instance->control_mutex)); pthread_cleanup_pop(0); + #ifdef GTK_ENABLED + if (fsupdated == 0) { + g_idle_add(gtkgui_updatefullscreen, local_td->instance); + fsupdated = 1; + } + #endif } tryagain = TRYAGAIN_FALSE; Index: plugin.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.cpp,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** plugin.cpp 13 Dec 2004 21:24:03 -0000 1.164 --- plugin.cpp 14 Dec 2004 16:25:42 -0000 1.165 *************** *** 632,635 **** --- 632,637 ---- gdk_flush(); gtk_widget_set_events(gtkwidget, GDK_BUTTON_PRESS_MASK); + gtk_widget_set_events(gtkwidget, GDK_KEY_PRESS_MASK); + #ifdef GTK2_ENABLED gtk_widget_set_size_request(gtkwidget, aWindow->width, *************** *** 1946,1949 **** --- 1948,1953 ---- GdkScreen *screen; GdkRectangle rect; + gint wx, wy; + gint wwidth, wheight; #endif *************** *** 1988,1991 **** --- 1992,1997 ---- if (DEBUG > 1) printf("SetFullscreen doing nothing\n"); + #ifdef GTK2_ENABLED + screen = gtk_window_get_screen(GTK_WINDOW(gtkwidget)); gdk_screen_get_monitor_geometry(screen, *************** *** 1993,2000 **** (screen, gtkwidget->window), &rect); ! ! gtk_window_resize(GTK_WINDOW(gtkwidget), rect.width, ! rect.height); ! fullscreen = 1; } else { --- 1999,2050 ---- (screen, gtkwidget->window), &rect); ! //gtk_widget_reparent(gtkwidget, fs_window); ! gtk_window_get_size(GTK_WINDOW(gtkwidget), &wwidth, &wheight); ! if ((wwidth != rect.width) && (wheight != rect.height)) { ! XReparentWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window), ! GDK_WINDOW_XWINDOW(gtkwidget->window), ! GDK_WINDOW_XWINDOW(fs_window->window), 0, 0); ! ! gtk_widget_map(gtkwidget); ! ! gtk_window_resize(GTK_WINDOW(gtkwidget), rect.width, ! rect.height); ! if (DEBUG) ! printf("gtkwidget resized to %i x %i\n",rect.width,rect.height); ! } else { ! if (DEBUG) ! printf("gtkwidget is %i x %i\n", wwidth, wheight); ! } ! x = rect.width; ! y = rect.height; ! disp_y = y; ! disp_x = x; ! if (movie_height != 0 && movie_width != 0) { ! disp_y = ((long int) (x * movie_height)) / movie_width; ! disp_x = ((long int) (y * movie_width)) / movie_height; ! } else { ! if (win_width != 0) { ! disp_y = ((long int) (x * win_height)) / win_width; ! disp_x = ((long int) (y * win_width)) / win_height; ! } ! } ! pos_y = (y - disp_y) / 2; ! pos_x = (x - disp_x) / 2; ! if (drawing_area != NULL) { ! if (disp_y <= y) { ! gtk_widget_set_usize(drawing_area, x, disp_y); ! gtk_fixed_move(GTK_FIXED(fixed_container), ! GTK_WIDGET(drawing_area), 0, pos_y); ! if (DEBUG) ! printf("drawing_area is %i x %i\n", x, disp_y); ! } else { ! gtk_widget_set_usize(drawing_area, disp_x, y); ! gtk_fixed_move(GTK_FIXED(fixed_container), ! GTK_WIDGET(drawing_area), pos_x, 0); ! if (DEBUG) ! printf("drawing_area is %i x %i\n", disp_x, y); ! } ! } ! #endif fullscreen = 1; } else { *************** *** 2172,2211 **** gtk_widget_realize(fs_window); - FILE *fslog; - gint wx, wy, wwidth, wheight; // wdepth; - fslog = fopen("/tmp/mplayerplug-in.fs.log", "a+"); - gtk_window_get_position(GTK_WINDOW(fs_window), &wx, &wy); - gtk_window_get_size(GTK_WINDOW(fs_window), &wwidth, &wheight); - fprintf(fslog, "Full Screen window info before fullscreen\n"); - fprintf(fslog, "x, y values %i,%i\n", wx, wy); - fprintf(fslog, "width, height values %i,%i\n", wwidth, - wheight); - - fprintf(fslog, "screen width, height values %i, %i\n", - gdk_screen_get_width(screen), - gdk_screen_get_height(screen)); - fprintf(fslog, "monitor # %i\n", - gdk_screen_get_monitor_at_window(screen, - gtkwidget->window)); - fprintf(fslog, "x, y values %i,%i\n", rect.x, rect.y); - fprintf(fslog, "width, height values %i,%i\n", rect.width, - rect.height); - gdk_window_get_root_origin(gtkwidget->window, &wx, &wy); - gtk_window_get_size(GTK_WINDOW(gtkwidget), &wwidth, &wheight); - fprintf(fslog, "player window info\n"); - fprintf(fslog, "x, y values %i,%i\n", wx, wy); - fprintf(fslog, "width, height values %i,%i\n", wwidth, - wheight); - gtk_window_move(GTK_WINDOW(fs_window), wx, wy); - gtk_window_get_position(GTK_WINDOW(fs_window), &wx, &wy); - gtk_window_get_size(GTK_WINDOW(fs_window), &wwidth, &wheight); - fprintf(fslog, "Full Screen window info\n"); - fprintf(fslog, "x, y values %i,%i\n", wx, wy); - fprintf(fslog, "width, height values %i,%i\n", wwidth, - wheight); - - fclose(fslog); gtk_widget_show(fs_window); --- 2222,2227 ---- |