mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
2008-06-27 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/gl/cogl.c: Temp workaround for 10.4 ATI card OSX folks, see #929 (Tommi Komulainen) Bug 998 - clutter always captures X input events * clutter/eglx/clutter-stage-egl.c: * clutter/glx/clutter-stage-glx.c: When we disable X event retrival, dont still select for window events.
This commit is contained in:
parent
bff2f01712
commit
03d7fdacd6
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2008-06-27 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/cogl/gl/cogl.c:
|
||||||
|
Temp workaround for 10.4 ATI card OSX folks, see #929
|
||||||
|
(Tommi Komulainen)
|
||||||
|
|
||||||
|
Bug 998 - clutter always captures X input events
|
||||||
|
|
||||||
|
* clutter/eglx/clutter-stage-egl.c:
|
||||||
|
* clutter/glx/clutter-stage-glx.c:
|
||||||
|
When we disable X event retrival, dont still select for window
|
||||||
|
events.
|
||||||
|
|
||||||
2008-06-27 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-06-27 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-event.h:
|
* clutter/clutter-event.h:
|
||||||
|
@ -840,6 +840,32 @@ cogl_setup_viewport (guint width,
|
|||||||
GE( glTranslatef (0.0f, -1.0 * height, 0.0f) );
|
GE( glTranslatef (0.0f, -1.0 * height, 0.0f) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_CLUTTER_OSX
|
||||||
|
static gboolean
|
||||||
|
really_enable_npot (void)
|
||||||
|
{
|
||||||
|
/* OSX backend + ATI Radeon X1600 + NPOT texture + GL_REPEAT seems to crash
|
||||||
|
* http://bugzilla.openedhand.com/show_bug.cgi?id=929
|
||||||
|
*
|
||||||
|
* Temporary workaround until post 0.8 we rejig the features set up a
|
||||||
|
* little to allow the backend to overide.
|
||||||
|
*/
|
||||||
|
const char *gl_renderer;
|
||||||
|
const char *env_string;
|
||||||
|
|
||||||
|
/* Regardless of hardware, allow user to decide. */
|
||||||
|
env_string = g_getenv ("COGL_ENABLE_NPOT");
|
||||||
|
if (env_string != NULL)
|
||||||
|
return env_string[0] == '1';
|
||||||
|
|
||||||
|
gl_renderer = (char*)glGetString (GL_RENDERER);
|
||||||
|
if (strstr (gl_renderer, "ATI Radeon X1600") != NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cogl_features_init ()
|
_cogl_features_init ()
|
||||||
{
|
{
|
||||||
@ -855,7 +881,10 @@ _cogl_features_init ()
|
|||||||
|
|
||||||
if (cogl_check_extension ("GL_ARB_texture_non_power_of_two", gl_extensions))
|
if (cogl_check_extension ("GL_ARB_texture_non_power_of_two", gl_extensions))
|
||||||
{
|
{
|
||||||
flags |= COGL_FEATURE_TEXTURE_NPOT;
|
#ifdef HAVE_CLUTTER_OSX
|
||||||
|
if (really_enable_npot ())
|
||||||
|
#endif
|
||||||
|
flags |= COGL_FEATURE_TEXTURE_NPOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GL_YCBCR_MESA
|
#ifdef GL_YCBCR_MESA
|
||||||
|
@ -177,27 +177,29 @@ clutter_stage_egl_realize (ClutterActor *actor)
|
|||||||
WhitePixel (stage_x11->xdpy,
|
WhitePixel (stage_x11->xdpy,
|
||||||
stage_x11->xscreen));
|
stage_x11->xscreen));
|
||||||
|
|
||||||
if (clutter_x11_has_xinput())
|
if (!backend_x11->no_xevent_retrieval)
|
||||||
{
|
{
|
||||||
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
if (clutter_x11_has_xinput())
|
||||||
StructureNotifyMask |
|
{
|
||||||
FocusChangeMask |
|
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
||||||
ExposureMask |
|
StructureNotifyMask |
|
||||||
PropertyChangeMask);
|
FocusChangeMask |
|
||||||
|
ExposureMask |
|
||||||
|
PropertyChangeMask);
|
||||||
#ifdef USE_XINPUT
|
#ifdef USE_XINPUT
|
||||||
_clutter_x11_select_events (stage_x11->xwin);
|
_clutter_x11_select_events (stage_x11->xwin);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
||||||
|
StructureNotifyMask |
|
||||||
|
FocusChangeMask |
|
||||||
|
ExposureMask |
|
||||||
|
PointerMotionMask |
|
||||||
|
KeyPressMask | KeyReleaseMask |
|
||||||
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
|
PropertyChangeMask);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
|
||||||
StructureNotifyMask |
|
|
||||||
FocusChangeMask |
|
|
||||||
ExposureMask |
|
|
||||||
/* FIXME: we may want to eplicity enable MotionMask */
|
|
||||||
PointerMotionMask |
|
|
||||||
KeyPressMask | KeyReleaseMask |
|
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
|
||||||
PropertyChangeMask);
|
|
||||||
|
|
||||||
/* FIXME, do these in a clutterstage_x11_realise? */
|
/* FIXME, do these in a clutterstage_x11_realise? */
|
||||||
clutter_stage_x11_fix_window_size (stage_x11);
|
clutter_stage_x11_fix_window_size (stage_x11);
|
||||||
|
@ -180,27 +180,29 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
|||||||
mask, &xattr);
|
mask, &xattr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clutter_x11_has_xinput())
|
if (!backend_x11->no_xevent_retrieval)
|
||||||
{
|
{
|
||||||
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
if (clutter_x11_has_xinput())
|
||||||
StructureNotifyMask |
|
{
|
||||||
FocusChangeMask |
|
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
||||||
ExposureMask |
|
StructureNotifyMask |
|
||||||
PropertyChangeMask);
|
FocusChangeMask |
|
||||||
|
ExposureMask |
|
||||||
|
PropertyChangeMask);
|
||||||
#ifdef USE_XINPUT
|
#ifdef USE_XINPUT
|
||||||
_clutter_x11_select_events (stage_x11->xwin);
|
_clutter_x11_select_events (stage_x11->xwin);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
||||||
|
StructureNotifyMask |
|
||||||
|
FocusChangeMask |
|
||||||
|
ExposureMask |
|
||||||
|
PointerMotionMask |
|
||||||
|
KeyPressMask | KeyReleaseMask |
|
||||||
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
|
PropertyChangeMask);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
XSelectInput (stage_x11->xdpy, stage_x11->xwin,
|
|
||||||
StructureNotifyMask |
|
|
||||||
FocusChangeMask |
|
|
||||||
ExposureMask |
|
|
||||||
/* FIXME: we may want to eplicity enable MotionMask */
|
|
||||||
PointerMotionMask |
|
|
||||||
KeyPressMask | KeyReleaseMask |
|
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
|
||||||
PropertyChangeMask);
|
|
||||||
|
|
||||||
/* no user resize.. */
|
/* no user resize.. */
|
||||||
clutter_stage_x11_fix_window_size (stage_x11);
|
clutter_stage_x11_fix_window_size (stage_x11);
|
||||||
|
Loading…
Reference in New Issue
Block a user