src/video/gem/SDL_gemvideo.c
branchSDL-1.2
changeset 11568 6fbdeeef1935
parent 11566 8292cd49212c
child 11569 eacc3725d279
equal deleted inserted replaced
11566:8292cd49212c 11568:6fbdeeef1935
   408 	GEM_icon_name = empty_name;
   408 	GEM_icon_name = empty_name;
   409 
   409 
   410 	GEM_handle = -1;
   410 	GEM_handle = -1;
   411 	GEM_locked = SDL_FALSE;
   411 	GEM_locked = SDL_FALSE;
   412 	GEM_win_fulled = SDL_FALSE;
   412 	GEM_win_fulled = SDL_FALSE;
       
   413 	GEM_iconified = SDL_FALSE;
   413 	GEM_fullscreen = SDL_FALSE;
   414 	GEM_fullscreen = SDL_FALSE;
   414 	GEM_lock_redraw = SDL_TRUE;	/* Prevent redraw till buffers are setup */
   415 	GEM_lock_redraw = SDL_TRUE;	/* Prevent redraw till buffers are setup */
   415 
   416 
   416 	VDI_screen = NULL;
   417 	VDI_screen = NULL;
   417 	VDI_pitch = VDI_w * VDI_pixelsize;
   418 	VDI_pitch = VDI_w * VDI_pixelsize;
   789 				0,0);
   790 				0,0);
   790 			GEM_refresh_name = SDL_FALSE;
   791 			GEM_refresh_name = SDL_FALSE;
   791 
   792 
   792 			/* Open the window */
   793 			/* Open the window */
   793 			wind_open(GEM_handle,x2,y2,w2,h2);
   794 			wind_open(GEM_handle,x2,y2,w2,h2);
       
   795 
       
   796 			GEM_iconified = SDL_FALSE;
   794 		} else {
   797 		} else {
   795 			/* Resize window to fit asked video mode */
   798 			/* Resize window to fit asked video mode */
   796 			wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
   799 			wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
   797 			if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width+16,height, &x2,&y2,&w2,&h2)) {
   800 			if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width+16,height, &x2,&y2,&w2,&h2)) {
   798 				wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
   801 				wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
   799 			}
   802 			}
   800 		}
   803 		}
   801 
   804 
   802 		GEM_align_work_area(this, GEM_handle, 0, 0);
   805 		GEM_align_work_area(this, GEM_handle, 0);
   803 		GEM_fullscreen = SDL_FALSE;
   806 		GEM_fullscreen = SDL_FALSE;
   804 	}
   807 	}
   805 
   808 
   806 	/* Set up the new mode framebuffer */
   809 	/* Set up the new mode framebuffer */
   807 	current->w = width;
   810 	current->w = width;
   837 
   840 
   838 	/* We're done */
   841 	/* We're done */
   839 	return(current);
   842 	return(current);
   840 }
   843 }
   841 
   844 
   842 void GEM_align_work_area(_THIS, short windowid, int clear_pads, int iconified)
   845 void GEM_align_work_area(_THIS, short windowid, int clear_pads)
   843 {
   846 {
   844 	int new_x, new_w;
   847 	int new_x, new_w;
   845 
   848 
   846 	wind_get(windowid, WF_WORKXYWH, &GEM_work_x,&GEM_work_y,&GEM_work_w,&GEM_work_h);
   849 	wind_get(windowid, WF_WORKXYWH, &GEM_work_x,&GEM_work_y,&GEM_work_w,&GEM_work_h);
   847 	if (iconified) {
   850 	if (GEM_iconified) {
   848 		return;
   851 		return;
   849 	}
   852 	}
   850 
   853 
   851 	/* Align work area on 16 pixels boundary (faster for bitplanes modes) */
   854 	/* Align work area on 16 pixels boundary (faster for bitplanes modes) */
   852 	new_x = GEM_work_x;
   855 	new_x = GEM_work_x;
  1227 static void refresh_window(_THIS, int winhandle, short *rect)
  1230 static void refresh_window(_THIS, int winhandle, short *rect)
  1228 {
  1231 {
  1229 	MFDB mfdb_src;
  1232 	MFDB mfdb_src;
  1230 	short pxy[8];
  1233 	short pxy[8];
  1231 	SDL_Surface *surface;
  1234 	SDL_Surface *surface;
  1232 	int iconified;
  1235 
  1233 
  1236 	if (GEM_iconified && GEM_icon) {
  1234 	/* Is window iconified ? */
       
  1235 	iconified = 0;
       
  1236 /*	if (GEM_wfeatures & (1<<WF_ICONIFY))*/ {
       
  1237 		if (wind_get(winhandle, WF_ICONIFY, &pxy[0], &pxy[1], &pxy[2], &pxy[3])!=0) {
       
  1238 			iconified = pxy[0];
       
  1239 		}
       
  1240 	}
       
  1241 
       
  1242 	if (iconified && GEM_icon) {
       
  1243 		short icon_rect[4], dst_rect[4];
  1237 		short icon_rect[4], dst_rect[4];
  1244 		short iconx,icony;
  1238 		short iconx,icony;
  1245 
  1239 
  1246 		surface = GEM_icon;
  1240 		surface = GEM_icon;
  1247 
  1241