mirror of
https://github.com/brl/mutter.git
synced 2024-12-03 05:10:40 -05:00
osx: added resolution initialization in backend
It's important step of initialization because all features calls from font rendering libs based on this parameter. By default it equals to -1 and test-text-cache test crashes in this case.
This commit is contained in:
parent
dc23b88de2
commit
52b6a3cd49
@ -37,7 +37,19 @@ static gboolean
|
||||
clutter_backend_osx_post_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
{
|
||||
return TRUE;
|
||||
CLUTTER_OSX_POOL_ALLOC();
|
||||
/* getting standart dpi for main screen */
|
||||
NSDictionary* prop = [[NSScreen mainScreen] deviceDescription];
|
||||
NSSize size;
|
||||
[[prop valueForKey:@"NSDeviceResolution"] getValue:&size];
|
||||
CLUTTER_OSX_POOL_RELEASE();
|
||||
/* setting dpi for backend, it needs by font rendering library */
|
||||
if (size.height > 0)
|
||||
{
|
||||
clutter_backend_set_resolution (backend, size.height);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static ClutterFeatureFlags
|
||||
|
Loading…
Reference in New Issue
Block a user