[asterisk-commits] rizzo: branch group/video_console r89629 - /team/group/video_console/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 27 06:46:21 CST 2007


Author: rizzo
Date: Tue Nov 27 06:46:21 2007
New Revision: 89629

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89629
Log:
some comments

Modified:
    team/group/video_console/channels/console_video.c

Modified: team/group/video_console/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/group/video_console/channels/console_video.c?view=diff&rev=89629&r1=89628&r2=89629
==============================================================================
--- team/group/video_console/channels/console_video.c (original)
+++ team/group/video_console/channels/console_video.c Tue Nov 27 06:46:21 2007
@@ -2737,6 +2737,7 @@
 		goto no_sdl;
 	}
 
+	/* Fetch the keypad now, we need it to know its size */
 	env->gui.keypad = get_keypad(env->keypad_file);
 	if (env->gui.keypad) {
 		env->out.keypad_dpy.w = env->gui.keypad->w;
@@ -2758,16 +2759,17 @@
 			env->out.loc_dpy.w, env->out.loc_dpy.h, env->in.rem_dpy.w + env->out.keypad_dpy.w, 0))
 		goto no_sdl;
 
+	/* display the skin, but do not free it as we need it later to
+	 * restore text areas and maybe sliders too.
+	 */
 	if (env->gui.keypad) {
-		struct SDL_Rect dest;
-		dest.x = env->in.rem_dpy.w;
-		dest.y = 0;
-		dest.w = env->gui.keypad->w;
-		dest.h = env->gui.keypad->h;
-		env->win[WIN_KEYPAD].rect = dest;
-
-		SDL_BlitSurface(env->gui.keypad, NULL, env->screen, &dest);
-		SDL_UpdateRects(env->screen, 1, &dest);
+		struct SDL_Rect *dest = &env->win[WIN_KEYPAD].rect;
+		dest->x = env->in.rem_dpy.w;
+		dest->y = 0;
+		dest->w = env->gui.keypad->w;
+		dest->h = env->gui.keypad->h;
+		SDL_BlitSurface(env->gui.keypad, NULL, env->screen, dest);
+		SDL_UpdateRects(env->screen, 1, dest);
 	}
 	ast_mutex_init(&env->in.dec_in_lock);
 	env->in.dec_in_cur = &env->in.dec_in[0];




More information about the asterisk-commits mailing list