Enlightenment CVS committal
Author : barbieri
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_evas
Modified Files:
ecore_evas_x.c
Log Message:
Software 16 X11 now does rotation.
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_x.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -3 -r1.105 -r1.106
--- ecore_evas_x.c 21 Jun 2007 22:49:36 -0000 1.105
+++ ecore_evas_x.c 7 Aug 2007 19:09:53 -0000 1.106
@@ -1512,15 +1512,75 @@
}
static void
-_ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation)
+_ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation,
+ Evas_Engine_Info *einfo)
{
int rot_dif;
- if (ee->rotation == rotation) return;
- if (!strcmp(ee->driver, "gl_x11")) return;
- if (!strcmp(ee->driver, "software_16_x11")) return;
rot_dif = ee->rotation - rotation;
if (rot_dif < 0) rot_dif = -rot_dif;
+
+ if (rot_dif != 180)
+ {
+ int minw, minh, maxw, maxh, basew, baseh, stepw, steph;
+
+ evas_engine_info_set(ee->evas, einfo);
+ if (!ee->prop.fullscreen)
+ {
+ ecore_x_window_resize(ee->engine.x.win, ee->h, ee->w);
+ ee->expecting_resize.w = ee->h;
+ ee->expecting_resize.h = ee->w;
+ }
+ else
+ {
+ int w, h;
+
+ ecore_x_window_size_get(ee->engine.x.win, &w, &h);
+ ecore_x_window_resize(ee->engine.x.win, h, w);
+ if ((rotation == 0) || (rotation == 180))
+ {
+ evas_output_size_set(ee->evas, ee->w, ee->h);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ }
+ else
+ {
+ evas_output_size_set(ee->evas, ee->h, ee->w);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ }
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ }
+ ecore_evas_size_min_get(ee, &minw, &minh);
+ ecore_evas_size_max_get(ee, &maxw, &maxh);
+ ecore_evas_size_base_get(ee, &basew, &baseh);
+ ecore_evas_size_step_get(ee, &stepw, &steph);
+ ee->rotation = rotation;
+ ecore_evas_size_min_set(ee, minh, minw);
+ ecore_evas_size_max_set(ee, maxh, maxw);
+ ecore_evas_size_base_set(ee, baseh, basew);
+ ecore_evas_size_step_set(ee, steph, stepw);
+ _ecore_evas_x_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
+ ecore_x_current_time_get());
+ }
+ else
+ {
+ evas_engine_info_set(ee->evas, einfo);
+ ee->rotation = rotation;
+ _ecore_evas_x_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
+ ecore_x_current_time_get());
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ }
+
+ 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);
+}
+
+static void
+_ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation)
+{
+ if (ee->rotation == rotation) return;
+ if (!strcmp(ee->driver, "gl_x11")) return;
if (!strcmp(ee->driver, "software_x11"))
{
#ifdef BUILD_ECORE_X
@@ -1534,62 +1594,22 @@
einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
#endif /* HAVE_ECORE_X_XCB */
if (!einfo) return;
- if (rot_dif != 180)
- {
- int minw, minh, maxw, maxh, basew, baseh, stepw, steph;
-
- einfo->info.rotation = rotation;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
- if (!ee->prop.fullscreen)
- {
- ecore_x_window_resize(ee->engine.x.win, ee->h, ee->w);
- ee->expecting_resize.w = ee->h;
- ee->expecting_resize.h = ee->w;
- }
- else
- {
- int w, h;
-
- ecore_x_window_size_get(ee->engine.x.win, &w, &h);
- ecore_x_window_resize(ee->engine.x.win, h, w);
- if ((rotation == 0) || (rotation == 180))
- {
- evas_output_size_set(ee->evas, ee->w, ee->h);
- evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
- }
- else
- {
- evas_output_size_set(ee->evas, ee->h, ee->w);
- evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
- }
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
- ecore_evas_size_min_get(ee, &minw, &minh);
- ecore_evas_size_max_get(ee, &maxw, &maxh);
- ecore_evas_size_base_get(ee, &basew, &baseh);
- ecore_evas_size_step_get(ee, &stepw, &steph);
- ee->rotation = rotation;
- ecore_evas_size_min_set(ee, minh, minw);
- ecore_evas_size_max_set(ee, maxh, maxw);
- ecore_evas_size_base_set(ee, baseh, basew);
- ecore_evas_size_step_set(ee, steph, stepw);
- _ecore_evas_x_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- ecore_x_current_time_get());
- }
- else
- {
- einfo->info.rotation = rotation;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
- ee->rotation = rotation;
- _ecore_evas_x_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- ecore_x_current_time_get());
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
- 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);
+ einfo->info.rotation = rotation;
+ _ecore_evas_x_rotation_set_internal
+ (ee, rotation, (Evas_Engine_Info *)einfo);
#endif /* BUILD_ECORE_X */
+ }
+ else if (!strcmp(ee->driver, "software_16_x11"))
+ {
+#if defined(BUILD_ECORE_X) && defined(BUILD_ECORE_EVAS_X11_16)
+ Evas_Engine_Info_Software_16_X11 *einfo;
+
+ einfo = (Evas_Engine_Info_Software_16_X11
*)evas_engine_info_get(ee->evas);
+ if (!einfo) return;
+ einfo->info.rotation = rotation;
+ _ecore_evas_x_rotation_set_internal
+ (ee, rotation, (Evas_Engine_Info *)einfo);
+#endif /* defined(BUILD_ECORE_X) && defined(BUILD_ECORE_EVAS_X11_16) */
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs