Hi

The attached patch fixes framebuffer rotation in ecore_evas_fb.c. The
correct output/viewport size was not set in the init and resize
functions of the ecore_evas when the rotation was 90 or 270 degrees.

Please apply.

-- Lars Munch
Index: ./src/lib/ecore_evas/ecore_evas_fb.c
===================================================================
RCS file: /var/cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_fb.c,v
retrieving revision 1.23
diff -p -u -r1.23 ecore_evas_fb.c
--- ./src/lib/ecore_evas/ecore_evas_fb.c	16 Jan 2007 10:17:46 -0000	1.23
+++ ./src/lib/ecore_evas/ecore_evas_fb.c	11 Feb 2007 11:36:15 -0000
@@ -105,7 +105,10 @@ _ecore_evas_fb_gain(void *data __UNUSED_
 	
 	ee = (Ecore_Evas *)l;
 	ee->visible = 1;
-	evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+	if ((ee->rotation == 90) || (ee->rotation == 270))
+	  evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
+	else
+	  evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
      }
    ecore_list_goto_first(ecore_evas_input_devices);
    dev = ecore_list_current(ecore_evas_input_devices);
@@ -325,9 +328,18 @@ _ecore_evas_resize(Ecore_Evas *ee, int w
    if ((w == ee->w) && (h == ee->h)) return;
    ee->w = w;
    ee->h = h;
-   evas_output_size_set(ee->evas, ee->w, ee->h);
-   evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
-   evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+   if ((ee->rotation == 90) || (ee->rotation == 270))
+     {
+       evas_output_size_set(ee->evas, ee->h, ee->w);
+       evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+       evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
+     }
+   else
+     {
+       evas_output_size_set(ee->evas, ee->w, ee->h);
+       evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+       evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+     }
    if (ee->func.fn_resize) ee->func.fn_resize(ee);	
 }
 
@@ -337,9 +349,18 @@ _ecore_evas_move_resize(Ecore_Evas *ee, 
    if ((w == ee->w) && (h == ee->h)) return;
    ee->w = w;
    ee->h = h;
-   evas_output_size_set(ee->evas, ee->w, ee->h);
-   evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
-   evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+   if ((ee->rotation == 90) || (ee->rotation == 270))
+     {
+       evas_output_size_set(ee->evas, ee->h, ee->w);
+       evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+       evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
+     }
+   else
+     {
+       evas_output_size_set(ee->evas, ee->w, ee->h);
+       evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+       evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+     }
    if (ee->func.fn_resize) ee->func.fn_resize(ee);	
 }
 
@@ -611,9 +632,18 @@ ecore_evas_fb_new(char *disp_name, int r
    ee->evas = evas_new();
    evas_data_attach_set(ee->evas, ee);
    evas_output_method_set(ee->evas, rmethod);
-   evas_output_size_set(ee->evas, w, h);
-   evas_output_viewport_set(ee->evas, 0, 0, w, h);
-   
+
+   if ((rotation == 90) || (rotation == 270))
+     {
+       evas_output_size_set(ee->evas, h, w);
+       evas_output_viewport_set(ee->evas, 0, 0, h, w);
+     }
+   else
+     {
+       evas_output_size_set(ee->evas, w, h);
+       evas_output_viewport_set(ee->evas, 0, 0, w, h);
+     }
+
    einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
    if (einfo)
      {
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to