add fullscreen option for a fair number of engines - didnt do xcb - more work
:( SVN revision: 46636
This commit is contained in:
parent
996bec49c9
commit
93485fde3f
|
@ -14,7 +14,7 @@ engine_gl_sdl_args(const char *engine, int width, int height)
|
||||||
einfo = (Evas_Engine_Info_GL_SDL *) evas_engine_info_get(evas);
|
einfo = (Evas_Engine_Info_GL_SDL *) evas_engine_info_get(evas);
|
||||||
|
|
||||||
/* the following is specific to the engine */
|
/* the following is specific to the engine */
|
||||||
einfo->flags.fullscreen = 0;
|
einfo->flags.fullscreen = fullscreen;
|
||||||
einfo->flags.noframe = 0;
|
einfo->flags.noframe = 0;
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
#include <Evas_Engine_GL_X11.h>
|
#include <Evas_Engine_GL_X11.h>
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
|
@ -60,6 +61,15 @@ engine_gl_x11_args(const char *engine, int width, int height)
|
||||||
goto destroy_window;
|
goto destroy_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
{
|
||||||
|
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
||||||
|
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
||||||
|
unsigned long data = state;
|
||||||
|
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
||||||
|
&data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
||||||
chint.res_name = "expedite";
|
chint.res_name = "expedite";
|
||||||
chint.res_class = "Expedite";
|
chint.res_class = "Expedite";
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
#include <Evas_Engine_Software_16_X11.h>
|
#include <Evas_Engine_Software_16_X11.h>
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
|
@ -56,6 +57,15 @@ engine_software_16_x11_args(const char *engine, int width, int height)
|
||||||
goto destroy_window;
|
goto destroy_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
{
|
||||||
|
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
||||||
|
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
||||||
|
unsigned long data = state;
|
||||||
|
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
||||||
|
&data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
||||||
chint.res_name = "expedite";
|
chint.res_name = "expedite";
|
||||||
chint.res_class = "Expedite";
|
chint.res_class = "Expedite";
|
||||||
|
|
|
@ -23,7 +23,7 @@ engine_software_sdl_args(const char *engine, int width, int height)
|
||||||
einfo = (Evas_Engine_Info_SDL *) evas_engine_info_get(evas);
|
einfo = (Evas_Engine_Info_SDL *) evas_engine_info_get(evas);
|
||||||
|
|
||||||
/* the following is specific to the engine */
|
/* the following is specific to the engine */
|
||||||
einfo->info.fullscreen = 0;
|
einfo->info.fullscreen = fullscreen;
|
||||||
einfo->info.noframe = 0;
|
einfo->info.noframe = 0;
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||||
|
|
|
@ -127,8 +127,6 @@ engine_software_xcb_args(const char *engine, int width, int height)
|
||||||
value_list);
|
value_list);
|
||||||
einfo->info.drawable = win;
|
einfo->info.drawable = win;
|
||||||
|
|
||||||
xcb_map_window(conn, win);
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||||
{
|
{
|
||||||
printf("Evas can not setup the informations of the Software XCB Engine\n");
|
printf("Evas can not setup the informations of the Software XCB Engine\n");
|
||||||
|
@ -178,6 +176,8 @@ engine_software_xcb_args(const char *engine, int width, int height)
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
||||||
|
|
||||||
|
xcb_map_window(conn, win);
|
||||||
|
|
||||||
while (!first_expose)
|
while (!first_expose)
|
||||||
engine_software_xcb_loop();
|
engine_software_xcb_loop();
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
#include <Evas_Engine_Software_X11.h>
|
#include <Evas_Engine_Software_X11.h>
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
|
@ -63,6 +64,14 @@ engine_software_xlib_args(const char *engine, int width, int height)
|
||||||
goto destroy_window;
|
goto destroy_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
{
|
||||||
|
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
||||||
|
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
||||||
|
unsigned long data = state;
|
||||||
|
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace, &data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
||||||
chint.res_name = "expedite";
|
chint.res_name = "expedite";
|
||||||
chint.res_class = "Expedite";
|
chint.res_class = "Expedite";
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
#include <Evas_Engine_XRender_X11.h>
|
#include <Evas_Engine_XRender_X11.h>
|
||||||
|
|
||||||
static Display *disp = NULL;
|
static Display *disp = NULL;
|
||||||
|
@ -58,6 +59,15 @@ engine_xrender_x11_args(const char *engine, int width, int height)
|
||||||
goto destroy_window;
|
goto destroy_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
{
|
||||||
|
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
||||||
|
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
||||||
|
unsigned long data = state;
|
||||||
|
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
||||||
|
&data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
||||||
chint.res_name = "expedite";
|
chint.res_name = "expedite";
|
||||||
chint.res_class = "Expedite";
|
chint.res_class = "Expedite";
|
||||||
|
|
|
@ -142,8 +142,6 @@ engine_xrender_xcb_args(const char *engine, int width, int height)
|
||||||
goto destroy_window;
|
goto destroy_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_map_window(conn, win);
|
|
||||||
|
|
||||||
/* XStoreName(disp, win, "Expedite - Evas Test Suite"); */
|
/* XStoreName(disp, win, "Expedite - Evas Test Suite"); */
|
||||||
|
|
||||||
cookie1 = xcb_intern_atom_unchecked(conn, 0, strlen("STRING"), "STRING");
|
cookie1 = xcb_intern_atom_unchecked(conn, 0, strlen("STRING"), "STRING");
|
||||||
|
@ -209,6 +207,8 @@ engine_xrender_xcb_args(const char *engine, int width, int height)
|
||||||
|
|
||||||
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
free(xcb_get_input_focus_reply(conn, xcb_get_input_focus_unchecked(conn), NULL));
|
||||||
|
|
||||||
|
xcb_map_window(conn, win);
|
||||||
|
|
||||||
while (!first_expose)
|
while (!first_expose)
|
||||||
engine_xrender_xcb_loop();
|
engine_xrender_xcb_loop();
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
Evas *evas = NULL;
|
Evas *evas = NULL;
|
||||||
int win_w = 720, win_h = 420;
|
int win_w = 720, win_h = 420;
|
||||||
int loops = LOOPS;
|
int loops = LOOPS;
|
||||||
|
int fullscreen = 0;
|
||||||
|
|
||||||
static char *datadir = NULL;
|
static char *datadir = NULL;
|
||||||
static int go = 1;
|
static int go = 1;
|
||||||
|
@ -1230,6 +1231,7 @@ _help(void)
|
||||||
" -t TEST-NUM\n"
|
" -t TEST-NUM\n"
|
||||||
" -e ENGINE\n"
|
" -e ENGINE\n"
|
||||||
" -p PROFILE\n"
|
" -p PROFILE\n"
|
||||||
|
" -f use netwm fullscreen request (requires x11 + wm)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Where ENGINE can be one of:\n"
|
"Where ENGINE can be one of:\n"
|
||||||
" ");
|
" ");
|
||||||
|
@ -1273,6 +1275,10 @@ _profile_parse(int argc, char **argv)
|
||||||
i++;
|
i++;
|
||||||
loops = atoi(argv[i]);
|
loops = atoi(argv[i]);
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[i], "-f"))
|
||||||
|
{
|
||||||
|
fullscreen = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ extern "C"
|
||||||
extern Evas *evas;
|
extern Evas *evas;
|
||||||
extern int win_w, win_h;
|
extern int win_w, win_h;
|
||||||
extern int loops;
|
extern int loops;
|
||||||
|
extern int fullscreen;
|
||||||
|
|
||||||
typedef struct _Expedite_Resolution Expedite_Resolution;
|
typedef struct _Expedite_Resolution Expedite_Resolution;
|
||||||
typedef struct _Expedite_Engine Expedite_Engine;
|
typedef struct _Expedite_Engine Expedite_Engine;
|
||||||
|
|
Loading…
Reference in New Issue