Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3082504d1b | ||
![]() |
8a529123be | ||
![]() |
54a680266c | ||
![]() |
e6d414edfc | ||
![]() |
70f20c90bd | ||
![]() |
b5f7005b88 | ||
![]() |
f0e2e238f3 | ||
![]() |
0c48a2633f | ||
![]() |
26a18e8312 | ||
![]() |
2ea121a186 | ||
![]() |
958cdd5117 | ||
![]() |
58d2bd0581 | ||
![]() |
e5067368f5 | ||
![]() |
c89918a339 | ||
![]() |
15b5e6717f | ||
![]() |
3b977f18b3 | ||
![]() |
233c148c16 | ||
![]() |
8c561a9075 | ||
![]() |
eb1df05570 | ||
![]() |
ffa8c0039d | ||
![]() |
379044c069 | ||
![]() |
c5f40f7481 | ||
![]() |
c9b0d04503 | ||
![]() |
0d41399fed | ||
![]() |
5d695c674e | ||
![]() |
7717725270 | ||
![]() |
6542ef2970 | ||
![]() |
83d19c8ae2 |
34
NEWS
34
NEWS
@@ -1,3 +1,37 @@
|
|||||||
|
3.18.4
|
||||||
|
======
|
||||||
|
* Fix mouse cursor disappearing in some multi-monitor setups [Rui; #763159]
|
||||||
|
* Do not assert on non-fatal runtime errors [Florian; #765058]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Rui Matos, Florian Müllner
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Cédric Valmary [oc]
|
||||||
|
|
||||||
|
3.18.3
|
||||||
|
======
|
||||||
|
* Fix initialization of bypass compositor hint [Rui; #758544]
|
||||||
|
* Fix crash when initial cursor position is not on a monitor [Marek; #756698]
|
||||||
|
* Fix crash when more CRTs are enabled than outputs connected [Rui; #751638]
|
||||||
|
* Fix crash during XWayland initialization [Marek; #751845]
|
||||||
|
* Ensure to send a ConfigureNotify to just mapped windows [Rui; #759492]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Marek Chalupa, Rui Matos, Jasper St. Pierre
|
||||||
|
|
||||||
|
3.18.2
|
||||||
|
======
|
||||||
|
* Misc. crash fixes [Jonas, Rui; #756675, #756660, #757148, #756796]
|
||||||
|
* Fix modifiers-only input source switching on Ubuntu [Alberts; #756543]
|
||||||
|
* Exit cleanly on initialization errors [Owen; #757311]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Ådahl, Rui Matos, Alberts Muktupāvels, Florian Müllner, Owen W. Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Daniel Șerbănescu [ro]
|
||||||
|
|
||||||
3.18.1
|
3.18.1
|
||||||
======
|
======
|
||||||
* Misc. crash fixes [Jonas, Rui, Carlos, Owen, Florian; #755096, #754979,
|
* Misc. crash fixes [Jonas, Rui, Carlos, Owen, Florian; #755096, #754979,
|
||||||
|
@@ -2,7 +2,7 @@ AC_PREREQ(2.62)
|
|||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [18])
|
m4_define([mutter_minor_version], [18])
|
||||||
m4_define([mutter_micro_version], [1])
|
m4_define([mutter_micro_version], [4])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <meta/meta-backend.h>
|
#include <meta/meta-backend.h>
|
||||||
#include "meta-backend-private.h"
|
#include "meta-backend-private.h"
|
||||||
#include "meta-input-settings-private.h"
|
#include "meta-input-settings-private.h"
|
||||||
@@ -626,7 +628,10 @@ meta_clutter_init (void)
|
|||||||
meta_create_backend ();
|
meta_create_backend ();
|
||||||
|
|
||||||
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
|
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
g_error ("Unable to initialize Clutter.\n");
|
{
|
||||||
|
g_warning ("Unable to initialize Clutter.\n");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX: We cannot handle high dpi scaling yet, so fix the scale to 1
|
* XXX: We cannot handle high dpi scaling yet, so fix the scale to 1
|
||||||
|
@@ -198,6 +198,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
|||||||
guint8 *cursor_data;
|
guint8 *cursor_data;
|
||||||
gboolean free_cursor_data;
|
gboolean free_cursor_data;
|
||||||
CoglContext *ctx;
|
CoglContext *ctx;
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
if (tracker->xfixes_cursor)
|
if (tracker->xfixes_cursor)
|
||||||
return;
|
return;
|
||||||
@@ -239,11 +240,17 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
|||||||
CLUTTER_CAIRO_FORMAT_ARGB32,
|
CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||||
cursor_image->width * 4, /* stride */
|
cursor_image->width * 4, /* stride */
|
||||||
cursor_data,
|
cursor_data,
|
||||||
NULL);
|
&error);
|
||||||
|
|
||||||
if (free_cursor_data)
|
if (free_cursor_data)
|
||||||
g_free (cursor_data);
|
g_free (cursor_data);
|
||||||
|
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate cursor sprite texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
if (sprite != NULL)
|
if (sprite != NULL)
|
||||||
{
|
{
|
||||||
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();
|
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();
|
||||||
|
@@ -136,6 +136,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
|||||||
ClutterBackend *clutter_backend;
|
ClutterBackend *clutter_backend;
|
||||||
CoglContext *cogl_context;
|
CoglContext *cogl_context;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
g_assert (self->texture == NULL);
|
g_assert (self->texture == NULL);
|
||||||
|
|
||||||
@@ -156,10 +157,19 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
|||||||
cogl_format,
|
cogl_format,
|
||||||
rowstride,
|
rowstride,
|
||||||
(uint8_t *) xc_image->pixels,
|
(uint8_t *) xc_image->pixels,
|
||||||
NULL);
|
&error);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
meta_cursor_sprite_set_texture (self, texture,
|
meta_cursor_sprite_set_texture (self, texture,
|
||||||
xc_image->xhot, xc_image->yhot);
|
xc_image->xhot, xc_image->yhot);
|
||||||
cogl_object_unref (texture);
|
|
||||||
|
if (texture)
|
||||||
|
cogl_object_unref (texture);
|
||||||
|
|
||||||
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
|
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
|
||||||
}
|
}
|
||||||
|
@@ -414,6 +414,10 @@ gint meta_monitor_manager_get_monitor_at_point (MetaMonitorManager
|
|||||||
gfloat x,
|
gfloat x,
|
||||||
gfloat y);
|
gfloat y);
|
||||||
|
|
||||||
|
void meta_monitor_manager_clear_output (MetaOutput *output);
|
||||||
|
void meta_monitor_manager_clear_mode (MetaMonitorMode *mode);
|
||||||
|
void meta_monitor_manager_clear_crtc (MetaCRTC *crtc);
|
||||||
|
|
||||||
/* Returns true if transform causes width and height to be inverted
|
/* Returns true if transform causes width and height to be inverted
|
||||||
This is true for the odd transforms in the enum */
|
This is true for the odd transforms in the enum */
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
|
@@ -178,7 +178,7 @@ make_logical_config (MetaMonitorManager *manager)
|
|||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
monitor_infos = g_array_sized_new (FALSE, TRUE, sizeof (MetaMonitorInfo),
|
monitor_infos = g_array_sized_new (FALSE, TRUE, sizeof (MetaMonitorInfo),
|
||||||
manager->n_outputs);
|
manager->n_crtcs);
|
||||||
|
|
||||||
/* Walk the list of MetaCRTCs, and build a MetaMonitorInfo
|
/* Walk the list of MetaCRTCs, and build a MetaMonitorInfo
|
||||||
for each of them, unless they reference a rectangle that
|
for each of them, unless they reference a rectangle that
|
||||||
@@ -346,6 +346,23 @@ meta_monitor_manager_constructed (GObject *object)
|
|||||||
manager->in_init = FALSE;
|
manager->in_init = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_monitor_manager_clear_output (MetaOutput *output)
|
||||||
|
{
|
||||||
|
g_free (output->name);
|
||||||
|
g_free (output->vendor);
|
||||||
|
g_free (output->product);
|
||||||
|
g_free (output->serial);
|
||||||
|
g_free (output->modes);
|
||||||
|
g_free (output->possible_crtcs);
|
||||||
|
g_free (output->possible_clones);
|
||||||
|
|
||||||
|
if (output->driver_notify)
|
||||||
|
output->driver_notify (output);
|
||||||
|
|
||||||
|
memset (output, 0, sizeof (*output));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_monitor_manager_free_output_array (MetaOutput *old_outputs,
|
meta_monitor_manager_free_output_array (MetaOutput *old_outputs,
|
||||||
int n_old_outputs)
|
int n_old_outputs)
|
||||||
@@ -353,22 +370,22 @@ meta_monitor_manager_free_output_array (MetaOutput *old_outputs,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_old_outputs; i++)
|
for (i = 0; i < n_old_outputs; i++)
|
||||||
{
|
meta_monitor_manager_clear_output (&old_outputs[i]);
|
||||||
g_free (old_outputs[i].name);
|
|
||||||
g_free (old_outputs[i].vendor);
|
|
||||||
g_free (old_outputs[i].product);
|
|
||||||
g_free (old_outputs[i].serial);
|
|
||||||
g_free (old_outputs[i].modes);
|
|
||||||
g_free (old_outputs[i].possible_crtcs);
|
|
||||||
g_free (old_outputs[i].possible_clones);
|
|
||||||
|
|
||||||
if (old_outputs[i].driver_notify)
|
|
||||||
old_outputs[i].driver_notify (&old_outputs[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (old_outputs);
|
g_free (old_outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_monitor_manager_clear_mode (MetaMonitorMode *mode)
|
||||||
|
{
|
||||||
|
g_free (mode->name);
|
||||||
|
|
||||||
|
if (mode->driver_notify)
|
||||||
|
mode->driver_notify (mode);
|
||||||
|
|
||||||
|
memset (mode, 0, sizeof (*mode));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_monitor_manager_free_mode_array (MetaMonitorMode *old_modes,
|
meta_monitor_manager_free_mode_array (MetaMonitorMode *old_modes,
|
||||||
int n_old_modes)
|
int n_old_modes)
|
||||||
@@ -376,16 +393,20 @@ meta_monitor_manager_free_mode_array (MetaMonitorMode *old_modes,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_old_modes; i++)
|
for (i = 0; i < n_old_modes; i++)
|
||||||
{
|
meta_monitor_manager_clear_mode (&old_modes[i]);
|
||||||
g_free (old_modes[i].name);
|
|
||||||
|
|
||||||
if (old_modes[i].driver_notify)
|
|
||||||
old_modes[i].driver_notify (&old_modes[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (old_modes);
|
g_free (old_modes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_monitor_manager_clear_crtc (MetaCRTC *crtc)
|
||||||
|
{
|
||||||
|
if (crtc->driver_notify)
|
||||||
|
crtc->driver_notify (crtc);
|
||||||
|
|
||||||
|
memset (crtc, 0, sizeof (*crtc));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_monitor_manager_free_crtc_array (MetaCRTC *old_crtcs,
|
meta_monitor_manager_free_crtc_array (MetaCRTC *old_crtcs,
|
||||||
int n_old_crtcs)
|
int n_old_crtcs)
|
||||||
@@ -393,10 +414,7 @@ meta_monitor_manager_free_crtc_array (MetaCRTC *old_crtcs,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_old_crtcs; i++)
|
for (i = 0; i < n_old_crtcs; i++)
|
||||||
{
|
meta_monitor_manager_clear_crtc (&old_crtcs[i]);
|
||||||
if (old_crtcs[i].driver_notify)
|
|
||||||
old_crtcs[i].driver_notify (&old_crtcs[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (old_crtcs);
|
g_free (old_crtcs);
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,8 @@
|
|||||||
#include "meta-cursor-renderer-native.h"
|
#include "meta-cursor-renderer-native.h"
|
||||||
#include "meta-launcher.h"
|
#include "meta-launcher.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
struct _MetaBackendNativePrivate
|
struct _MetaBackendNativePrivate
|
||||||
{
|
{
|
||||||
MetaLauncher *launcher;
|
MetaLauncher *launcher;
|
||||||
@@ -327,8 +329,15 @@ static void
|
|||||||
meta_backend_native_init (MetaBackendNative *native)
|
meta_backend_native_init (MetaBackendNative *native)
|
||||||
{
|
{
|
||||||
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
|
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
priv->launcher = meta_launcher_new (&error);
|
||||||
|
if (priv->launcher == NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Can't initialize KMS backend: %s\n", error->message);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
priv->launcher = meta_launcher_new ();
|
|
||||||
priv->barrier_manager = meta_barrier_manager_native_new ();
|
priv->barrier_manager = meta_barrier_manager_native_new ();
|
||||||
|
|
||||||
priv->up_client = up_client_new ();
|
priv->up_client = up_client_new ();
|
||||||
|
@@ -54,30 +54,22 @@ struct _MetaLauncher
|
|||||||
gboolean session_active;
|
gboolean session_active;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
|
||||||
report_error_and_die (const char *prefix,
|
|
||||||
GError *error)
|
|
||||||
{
|
|
||||||
/* if a function returns due to g_return_val_if_fail,
|
|
||||||
* then the error may not be set */
|
|
||||||
if (error)
|
|
||||||
g_error ("%s: %s", prefix, error->message);
|
|
||||||
else
|
|
||||||
g_error ("%s", prefix);
|
|
||||||
|
|
||||||
/* the error is not freed, but it is ok as g_error aborts the process */
|
|
||||||
}
|
|
||||||
|
|
||||||
static Login1Session *
|
static Login1Session *
|
||||||
get_session_proxy (GCancellable *cancellable)
|
get_session_proxy (GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
char *proxy_path;
|
char *proxy_path;
|
||||||
char *session_id;
|
char *session_id;
|
||||||
Login1Session *session_proxy;
|
Login1Session *session_proxy;
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
if (sd_pid_get_session (getpid (), &session_id) < 0)
|
if (sd_pid_get_session (getpid (), &session_id) < 0)
|
||||||
return NULL;
|
{
|
||||||
|
g_set_error (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND,
|
||||||
|
"Could not get session ID: %m");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
|
proxy_path = get_escaped_dbus_path ("/org/freedesktop/login1/session", session_id);
|
||||||
|
|
||||||
@@ -85,9 +77,9 @@ get_session_proxy (GCancellable *cancellable)
|
|||||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||||
"org.freedesktop.login1",
|
"org.freedesktop.login1",
|
||||||
proxy_path,
|
proxy_path,
|
||||||
cancellable, &error);
|
cancellable, error);
|
||||||
if (!session_proxy)
|
if (!session_proxy)
|
||||||
report_error_and_die ("Failed getting session proxy", error);
|
g_prefix_error(error, "Could not get session proxy: ");
|
||||||
|
|
||||||
free (proxy_path);
|
free (proxy_path);
|
||||||
|
|
||||||
@@ -95,16 +87,16 @@ get_session_proxy (GCancellable *cancellable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Login1Seat *
|
static Login1Seat *
|
||||||
get_seat_proxy (GCancellable *cancellable)
|
get_seat_proxy (GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
|
||||||
Login1Seat *seat = login1_seat_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
Login1Seat *seat = login1_seat_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||||
"org.freedesktop.login1",
|
"org.freedesktop.login1",
|
||||||
"/org/freedesktop/login1/seat/self",
|
"/org/freedesktop/login1/seat/self",
|
||||||
cancellable, &error);
|
cancellable, error);
|
||||||
if (!seat)
|
if (!seat)
|
||||||
report_error_and_die ("Could not get seat proxy", error);
|
g_prefix_error(error, "Could not get seat proxy: ");
|
||||||
|
|
||||||
return seat;
|
return seat;
|
||||||
}
|
}
|
||||||
@@ -357,69 +349,114 @@ out:
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
get_kms_fd (Login1Session *session_proxy,
|
get_kms_fd (Login1Session *session_proxy,
|
||||||
const gchar *seat_id,
|
const gchar *seat_id,
|
||||||
int *fd_out)
|
int *fd_out,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
int major, minor;
|
int major, minor;
|
||||||
int fd;
|
int fd;
|
||||||
gchar *path;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
path = get_primary_gpu_path (seat_id);
|
g_autofree gchar *path = get_primary_gpu_path (seat_id);
|
||||||
if (!path)
|
if (!path)
|
||||||
g_error ("could not find drm kms device");
|
{
|
||||||
|
g_set_error (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND,
|
||||||
|
"could not find drm kms device");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!get_device_info_from_path (path, &major, &minor))
|
if (!get_device_info_from_path (path, &major, &minor))
|
||||||
g_error ("Could not stat %s: %m", path);
|
{
|
||||||
|
g_set_error (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND,
|
||||||
|
"Could not get device info for path %s: %m", path);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (path);
|
if (!take_device (session_proxy, major, minor, &fd, NULL, error))
|
||||||
|
{
|
||||||
if (!take_device (session_proxy, major, minor, &fd, NULL, &error))
|
g_prefix_error (error, "Could not open DRM device: ");
|
||||||
report_error_and_die ("Could not open DRM device", error);
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*fd_out = fd;
|
*fd_out = fd;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
get_seat_id (void)
|
get_seat_id (GError **error)
|
||||||
{
|
{
|
||||||
char *session_id, *seat_id = NULL;
|
char *session_id, *seat_id;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (sd_pid_get_session (0, &session_id) < 0)
|
r = sd_pid_get_session (0, &session_id);
|
||||||
return NULL;
|
if (r < 0)
|
||||||
|
{
|
||||||
|
g_set_error (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND,
|
||||||
|
"Could not get session for PID: %s", g_strerror (-r));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* on error the seat_id will remain NULL */
|
r = sd_session_get_seat (session_id, &seat_id);
|
||||||
sd_session_get_seat (session_id, &seat_id);
|
|
||||||
free (session_id);
|
free (session_id);
|
||||||
|
|
||||||
|
if (r < 0)
|
||||||
|
{
|
||||||
|
g_set_error (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND,
|
||||||
|
"Could not get seat for session: %s", g_strerror (-r));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return seat_id;
|
return seat_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaLauncher *
|
MetaLauncher *
|
||||||
meta_launcher_new (void)
|
meta_launcher_new (GError **error)
|
||||||
{
|
{
|
||||||
MetaLauncher *self = NULL;
|
MetaLauncher *self = NULL;
|
||||||
Login1Session *session_proxy;
|
Login1Session *session_proxy = NULL;
|
||||||
char *seat_id;
|
Login1Seat *seat_proxy = NULL;
|
||||||
GError *error = NULL;
|
char *seat_id = NULL;
|
||||||
|
gboolean have_control = FALSE;
|
||||||
int kms_fd;
|
int kms_fd;
|
||||||
|
|
||||||
session_proxy = get_session_proxy (NULL);
|
session_proxy = get_session_proxy (NULL, error);
|
||||||
if (!login1_session_call_take_control_sync (session_proxy, FALSE, NULL, &error))
|
if (!session_proxy)
|
||||||
report_error_and_die ("Could not take control", error);
|
goto fail;
|
||||||
|
|
||||||
seat_id = get_seat_id ();
|
if (!login1_session_call_take_control_sync (session_proxy, FALSE, NULL, error))
|
||||||
|
{
|
||||||
|
g_prefix_error (error, "Could not take control: ");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
have_control = TRUE;
|
||||||
|
|
||||||
|
seat_id = get_seat_id (error);
|
||||||
if (!seat_id)
|
if (!seat_id)
|
||||||
g_error ("Failed getting seat id");
|
goto fail;
|
||||||
|
|
||||||
|
seat_proxy = get_seat_proxy (NULL, error);
|
||||||
|
if (!seat_proxy)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
if (!get_kms_fd (session_proxy, seat_id, &kms_fd, error))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
get_kms_fd (session_proxy, seat_id, &kms_fd);
|
|
||||||
free (seat_id);
|
free (seat_id);
|
||||||
|
|
||||||
self = g_slice_new0 (MetaLauncher);
|
self = g_slice_new0 (MetaLauncher);
|
||||||
self->session_proxy = session_proxy;
|
self->session_proxy = session_proxy;
|
||||||
self->seat_proxy = get_seat_proxy (NULL);
|
self->seat_proxy = seat_proxy;
|
||||||
|
|
||||||
self->session_active = TRUE;
|
self->session_active = TRUE;
|
||||||
|
|
||||||
@@ -429,8 +466,16 @@ meta_launcher_new (void)
|
|||||||
self);
|
self);
|
||||||
|
|
||||||
g_signal_connect (self->session_proxy, "notify::active", G_CALLBACK (on_active_changed), self);
|
g_signal_connect (self->session_proxy, "notify::active", G_CALLBACK (on_active_changed), self);
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
if (have_control)
|
||||||
|
login1_session_call_release_control_sync (session_proxy, NULL, NULL);
|
||||||
|
g_clear_object (&session_proxy);
|
||||||
|
g_clear_object (&seat_proxy);
|
||||||
|
free (seat_id);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
typedef struct _MetaLauncher MetaLauncher;
|
typedef struct _MetaLauncher MetaLauncher;
|
||||||
|
|
||||||
MetaLauncher *meta_launcher_new (void);
|
MetaLauncher *meta_launcher_new (GError **error);
|
||||||
void meta_launcher_free (MetaLauncher *self);
|
void meta_launcher_free (MetaLauncher *self);
|
||||||
|
|
||||||
gboolean meta_launcher_activate_session (MetaLauncher *self,
|
gboolean meta_launcher_activate_session (MetaLauncher *self,
|
||||||
|
@@ -82,6 +82,7 @@ struct _MetaBackendX11Private
|
|||||||
gchar *keymap_layouts;
|
gchar *keymap_layouts;
|
||||||
gchar *keymap_variants;
|
gchar *keymap_variants;
|
||||||
gchar *keymap_options;
|
gchar *keymap_options;
|
||||||
|
int locked_group;
|
||||||
};
|
};
|
||||||
typedef struct _MetaBackendX11Private MetaBackendX11Private;
|
typedef struct _MetaBackendX11Private MetaBackendX11Private;
|
||||||
|
|
||||||
@@ -297,15 +298,23 @@ handle_host_xevent (MetaBackend *backend,
|
|||||||
|
|
||||||
if (event->type == priv->xkb_event_base)
|
if (event->type == priv->xkb_event_base)
|
||||||
{
|
{
|
||||||
XkbAnyEvent *xkb_ev = (XkbAnyEvent *) event;
|
XkbEvent *xkb_ev = (XkbEvent *) event;
|
||||||
|
|
||||||
if (xkb_ev->device == META_VIRTUAL_CORE_KEYBOARD_ID)
|
if (xkb_ev->any.device == META_VIRTUAL_CORE_KEYBOARD_ID)
|
||||||
{
|
{
|
||||||
switch (xkb_ev->xkb_type)
|
switch (xkb_ev->any.xkb_type)
|
||||||
{
|
{
|
||||||
case XkbNewKeyboardNotify:
|
case XkbNewKeyboardNotify:
|
||||||
case XkbMapNotify:
|
case XkbMapNotify:
|
||||||
keymap_changed (backend);
|
keymap_changed (backend);
|
||||||
|
break;
|
||||||
|
case XkbStateNotify:
|
||||||
|
if (xkb_ev->state.changed & XkbGroupLockMask)
|
||||||
|
{
|
||||||
|
if (priv->locked_group != xkb_ev->state.locked_group)
|
||||||
|
XkbLockGroup (priv->xdisplay, XkbUseCoreKbd, priv->locked_group);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -776,6 +785,7 @@ meta_backend_x11_lock_layout_group (MetaBackend *backend,
|
|||||||
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
||||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||||
|
|
||||||
|
priv->locked_group = idx;
|
||||||
XkbLockGroup (priv->xdisplay, XkbUseCoreKbd, idx);
|
XkbLockGroup (priv->xdisplay, XkbUseCoreKbd, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -637,6 +637,70 @@ output_get_connector_type (MetaMonitorManagerXrandr *manager_xrandr,
|
|||||||
return META_CONNECTOR_TYPE_Unknown;
|
return META_CONNECTOR_TYPE_Unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
output_get_modes (MetaMonitorManager *manager,
|
||||||
|
MetaOutput *meta_output,
|
||||||
|
XRROutputInfo *output)
|
||||||
|
{
|
||||||
|
guint j, k;
|
||||||
|
guint n_actual_modes;
|
||||||
|
|
||||||
|
meta_output->modes = g_new0 (MetaMonitorMode *, output->nmode);
|
||||||
|
|
||||||
|
n_actual_modes = 0;
|
||||||
|
for (j = 0; j < (guint)output->nmode; j++)
|
||||||
|
{
|
||||||
|
for (k = 0; k < manager->n_modes; k++)
|
||||||
|
{
|
||||||
|
if (output->modes[j] == (XID)manager->modes[k].mode_id)
|
||||||
|
{
|
||||||
|
meta_output->modes[n_actual_modes] = &manager->modes[k];
|
||||||
|
n_actual_modes += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
meta_output->n_modes = n_actual_modes;
|
||||||
|
if (n_actual_modes > 0)
|
||||||
|
meta_output->preferred_mode = meta_output->modes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
output_get_crtcs (MetaMonitorManager *manager,
|
||||||
|
MetaOutput *meta_output,
|
||||||
|
XRROutputInfo *output)
|
||||||
|
{
|
||||||
|
guint j, k;
|
||||||
|
guint n_actual_crtcs;
|
||||||
|
|
||||||
|
meta_output->possible_crtcs = g_new0 (MetaCRTC *, output->ncrtc);
|
||||||
|
|
||||||
|
n_actual_crtcs = 0;
|
||||||
|
for (j = 0; j < (unsigned)output->ncrtc; j++)
|
||||||
|
{
|
||||||
|
for (k = 0; k < manager->n_crtcs; k++)
|
||||||
|
{
|
||||||
|
if ((XID)manager->crtcs[k].crtc_id == output->crtcs[j])
|
||||||
|
{
|
||||||
|
meta_output->possible_crtcs[n_actual_crtcs] = &manager->crtcs[k];
|
||||||
|
n_actual_crtcs += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
meta_output->n_possible_crtcs = n_actual_crtcs;
|
||||||
|
|
||||||
|
meta_output->crtc = NULL;
|
||||||
|
for (j = 0; j < manager->n_crtcs; j++)
|
||||||
|
{
|
||||||
|
if ((XID)manager->crtcs[j].crtc_id == output->crtc)
|
||||||
|
{
|
||||||
|
meta_output->crtc = &manager->crtcs[j];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_xmode_name (XRRModeInfo *xmode)
|
get_xmode_name (XRRModeInfo *xmode)
|
||||||
{
|
{
|
||||||
@@ -773,6 +837,8 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
|||||||
MetaOutput *meta_output;
|
MetaOutput *meta_output;
|
||||||
|
|
||||||
output = XRRGetOutputInfo (manager_xrandr->xdisplay, resources, resources->outputs[i]);
|
output = XRRGetOutputInfo (manager_xrandr->xdisplay, resources, resources->outputs[i]);
|
||||||
|
if (!output)
|
||||||
|
continue;
|
||||||
|
|
||||||
meta_output = &manager->outputs[n_actual_outputs];
|
meta_output = &manager->outputs[n_actual_outputs];
|
||||||
|
|
||||||
@@ -796,44 +862,8 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
|||||||
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
|
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
|
||||||
|
|
||||||
output_get_tile_info (manager_xrandr, meta_output);
|
output_get_tile_info (manager_xrandr, meta_output);
|
||||||
meta_output->n_modes = output->nmode;
|
output_get_modes (manager, meta_output, output);
|
||||||
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
|
output_get_crtcs (manager, meta_output, output);
|
||||||
for (j = 0; j < meta_output->n_modes; j++)
|
|
||||||
{
|
|
||||||
for (k = 0; k < manager->n_modes; k++)
|
|
||||||
{
|
|
||||||
if (output->modes[j] == (XID)manager->modes[k].mode_id)
|
|
||||||
{
|
|
||||||
meta_output->modes[j] = &manager->modes[k];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
meta_output->preferred_mode = meta_output->modes[0];
|
|
||||||
|
|
||||||
meta_output->n_possible_crtcs = output->ncrtc;
|
|
||||||
meta_output->possible_crtcs = g_new0 (MetaCRTC *, meta_output->n_possible_crtcs);
|
|
||||||
for (j = 0; j < (unsigned)output->ncrtc; j++)
|
|
||||||
{
|
|
||||||
for (k = 0; k < manager->n_crtcs; k++)
|
|
||||||
{
|
|
||||||
if ((XID)manager->crtcs[k].crtc_id == output->crtcs[j])
|
|
||||||
{
|
|
||||||
meta_output->possible_crtcs[j] = &manager->crtcs[k];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_output->crtc = NULL;
|
|
||||||
for (j = 0; j < manager->n_crtcs; j++)
|
|
||||||
{
|
|
||||||
if ((XID)manager->crtcs[j].crtc_id == output->crtc)
|
|
||||||
{
|
|
||||||
meta_output->crtc = &manager->crtcs[j];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_output->n_possible_clones = output->nclone;
|
meta_output->n_possible_clones = output->nclone;
|
||||||
meta_output->possible_clones = g_new0 (MetaOutput *, meta_output->n_possible_clones);
|
meta_output->possible_clones = g_new0 (MetaOutput *, meta_output->n_possible_clones);
|
||||||
@@ -857,7 +887,10 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
|||||||
else
|
else
|
||||||
meta_output->backlight = -1;
|
meta_output->backlight = -1;
|
||||||
|
|
||||||
n_actual_outputs++;
|
if (meta_output->n_modes == 0 || meta_output->n_possible_crtcs == 0)
|
||||||
|
meta_monitor_manager_clear_output (meta_output);
|
||||||
|
else
|
||||||
|
n_actual_outputs++;
|
||||||
}
|
}
|
||||||
|
|
||||||
XRRFreeOutputInfo (output);
|
XRRFreeOutputInfo (output);
|
||||||
|
@@ -152,6 +152,7 @@ file_loaded (GObject *source_object,
|
|||||||
{
|
{
|
||||||
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
|
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
CoglError *catch_error = NULL;
|
||||||
GTask *task;
|
GTask *task;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
@@ -186,9 +187,10 @@ file_loaded (GObject *source_object,
|
|||||||
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
||||||
row_stride,
|
row_stride,
|
||||||
pixels, 0,
|
pixels, 0,
|
||||||
NULL))
|
&catch_error))
|
||||||
{
|
{
|
||||||
g_warning ("Failed to create texture for background");
|
g_warning ("Failed to create texture for background");
|
||||||
|
cogl_error_free (catch_error);
|
||||||
cogl_object_unref (texture);
|
cogl_object_unref (texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <meta/util.h>
|
||||||
#include <meta/meta-background.h>
|
#include <meta/meta-background.h>
|
||||||
#include <meta/meta-background-image.h>
|
#include <meta/meta-background-image.h>
|
||||||
#include "meta-background-private.h"
|
#include "meta-background-private.h"
|
||||||
@@ -542,6 +543,7 @@ ensure_color_texture (MetaBackground *self)
|
|||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
||||||
|
CoglError *error = NULL;
|
||||||
uint8_t pixels[6];
|
uint8_t pixels[6];
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
@@ -582,7 +584,13 @@ ensure_color_texture (MetaBackground *self)
|
|||||||
COGL_PIXEL_FORMAT_RGB_888,
|
COGL_PIXEL_FORMAT_RGB_888,
|
||||||
width * 3,
|
width * 3,
|
||||||
pixels,
|
pixels,
|
||||||
NULL));
|
&error));
|
||||||
|
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate color texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <meta/meta-shadow-factory.h>
|
#include <meta/meta-shadow-factory.h>
|
||||||
|
#include <meta/util.h>
|
||||||
|
|
||||||
#include "cogl-utils.h"
|
#include "cogl-utils.h"
|
||||||
#include "region-utils.h"
|
#include "region-utils.h"
|
||||||
@@ -707,6 +708,7 @@ make_shadow (MetaShadow *shadow,
|
|||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
||||||
|
CoglError *error = NULL;
|
||||||
int d = get_box_filter_size (shadow->key.radius);
|
int d = get_box_filter_size (shadow->key.radius);
|
||||||
int spread = get_shadow_spread (shadow->key.radius);
|
int spread = get_shadow_spread (shadow->key.radius);
|
||||||
cairo_rectangle_int_t extents;
|
cairo_rectangle_int_t extents;
|
||||||
@@ -804,7 +806,13 @@ make_shadow (MetaShadow *shadow,
|
|||||||
(buffer +
|
(buffer +
|
||||||
(y_offset - shadow->outer_border_top) * buffer_width +
|
(y_offset - shadow->outer_border_top) * buffer_width +
|
||||||
(x_offset - shadow->outer_border_left)),
|
(x_offset - shadow->outer_border_left)),
|
||||||
NULL));
|
&error));
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate shadow texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
cairo_region_destroy (row_convolve_region);
|
cairo_region_destroy (row_convolve_region);
|
||||||
cairo_region_destroy (column_convolve_region);
|
cairo_region_destroy (column_convolve_region);
|
||||||
|
@@ -102,8 +102,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
|
|||||||
priv->pixmap = None;
|
priv->pixmap = None;
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
cogl_object_unref (priv->texture);
|
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||||
priv->texture = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -114,14 +113,20 @@ set_pixmap (MetaSurfaceActorX11 *self,
|
|||||||
|
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
||||||
|
CoglError *error = NULL;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
g_assert (priv->pixmap == None);
|
g_assert (priv->pixmap == None);
|
||||||
priv->pixmap = pixmap;
|
priv->pixmap = pixmap;
|
||||||
|
|
||||||
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, NULL));
|
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, &error));
|
||||||
|
|
||||||
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate stex texture: %s", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
|
||||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||||
|
|
||||||
priv->texture = texture;
|
priv->texture = texture;
|
||||||
|
@@ -1752,9 +1752,17 @@ build_and_scan_frame_mask (MetaWindowActor *self,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
|
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
|
||||||
COGL_PIXEL_FORMAT_A_8,
|
COGL_PIXEL_FORMAT_A_8,
|
||||||
stride, mask_data, NULL));
|
stride, mask_data, &error));
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate mask texture: %s", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_shaped_texture_set_mask_texture (stex, mask_texture);
|
meta_shaped_texture_set_mask_texture (stex, mask_texture);
|
||||||
|
@@ -1267,7 +1267,8 @@ root_cursor_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
||||||
|
|
||||||
/* Reload the cursor texture if the scale has changed. */
|
/* Reload the cursor texture if the scale has changed. */
|
||||||
meta_cursor_sprite_set_theme_scale (cursor_sprite, monitor->scale);
|
if (monitor)
|
||||||
|
meta_cursor_sprite_set_theme_scale (cursor_sprite, monitor->scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -3534,10 +3534,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
const MetaMonitorInfo *old, *new;
|
const MetaMonitorInfo *old, *new;
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP)
|
if (window->override_redirect || window->type == META_WINDOW_DESKTOP)
|
||||||
return;
|
|
||||||
|
|
||||||
if (window->override_redirect)
|
|
||||||
{
|
{
|
||||||
meta_window_update_monitor (window, FALSE);
|
meta_window_update_monitor (window, FALSE);
|
||||||
return;
|
return;
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
<method name="TakeControl">
|
<method name="TakeControl">
|
||||||
<arg name="force" type="b"/>
|
<arg name="force" type="b"/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="ReleaseControl">
|
||||||
|
</method>
|
||||||
<method name="TakeDevice">
|
<method name="TakeDevice">
|
||||||
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
|
<annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
|
||||||
<arg name="major" type="u" direction="in"/>
|
<arg name="major" type="u" direction="in"/>
|
||||||
|
@@ -138,12 +138,19 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
|
|||||||
|
|
||||||
for (i = 0; i < n_rectangles; i++)
|
for (i = 0; i < n_rectangles; i++)
|
||||||
{
|
{
|
||||||
|
CoglError *error = NULL;
|
||||||
cairo_rectangle_int_t rect;
|
cairo_rectangle_int_t rect;
|
||||||
cairo_region_get_rectangle (region, i, &rect);
|
cairo_region_get_rectangle (region, i, &rect);
|
||||||
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
|
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
|
||||||
rect.x, rect.y, rect.width, rect.height,
|
rect.x, rect.y, rect.width, rect.height,
|
||||||
shm_buffer,
|
shm_buffer,
|
||||||
rect.x, rect.y, 0, NULL);
|
rect.x, rect.y, 0, &error);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to set texture region: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_shm_buffer_end_access (shm_buffer);
|
wl_shm_buffer_end_access (shm_buffer);
|
||||||
|
@@ -112,7 +112,7 @@ struct wl_array *
|
|||||||
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source)
|
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source)
|
||||||
{
|
{
|
||||||
MetaWaylandDataSourcePrivate *priv =
|
MetaWaylandDataSourcePrivate *priv =
|
||||||
meta_wayland_data_source_get_instance_private (source);
|
meta_wayland_data_source_get_instance_private ((MetaWaylandDataSource *)source);
|
||||||
|
|
||||||
return &priv->mime_types;
|
return &priv->mime_types;
|
||||||
}
|
}
|
||||||
@@ -966,7 +966,7 @@ meta_wayland_data_source_has_mime_type (const MetaWaylandDataSource *source,
|
|||||||
const gchar *mime_type)
|
const gchar *mime_type)
|
||||||
{
|
{
|
||||||
MetaWaylandDataSourcePrivate *priv =
|
MetaWaylandDataSourcePrivate *priv =
|
||||||
meta_wayland_data_source_get_instance_private (source);
|
meta_wayland_data_source_get_instance_private ((MetaWaylandDataSource *)source);
|
||||||
gchar **p;
|
gchar **p;
|
||||||
|
|
||||||
wl_array_for_each (p, &priv->mime_types)
|
wl_array_for_each (p, &priv->mime_types)
|
||||||
|
@@ -823,8 +823,9 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
if (!meta_xwayland_is_xwayland_surface (surface))
|
if (!meta_xwayland_is_xwayland_surface (surface))
|
||||||
{
|
{
|
||||||
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
||||||
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
if (monitor)
|
||||||
(float)monitor->scale / surface->scale);
|
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
||||||
|
(float)monitor->scale / surface->scale);
|
||||||
}
|
}
|
||||||
meta_wayland_surface_update_outputs (surface);
|
meta_wayland_surface_update_outputs (surface);
|
||||||
}
|
}
|
||||||
|
@@ -1515,15 +1515,15 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
|||||||
surface,
|
surface,
|
||||||
xdg_popup_destructor);
|
xdg_popup_destructor);
|
||||||
|
|
||||||
|
surface->xdg_popup = popup_resource;
|
||||||
|
surface->xdg_shell_resource = resource;
|
||||||
|
|
||||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||||
{
|
{
|
||||||
xdg_popup_send_popup_done (popup_resource);
|
xdg_popup_send_popup_done (popup_resource);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface->xdg_popup = popup_resource;
|
|
||||||
surface->xdg_shell_resource = resource;
|
|
||||||
|
|
||||||
surface->popup.parent = parent_surf;
|
surface->popup.parent = parent_surf;
|
||||||
surface->popup.parent_destroy_listener.notify = handle_popup_parent_destroyed;
|
surface->popup.parent_destroy_listener.notify = handle_popup_parent_destroyed;
|
||||||
wl_resource_add_destroy_listener (parent_surf->resource,
|
wl_resource_add_destroy_listener (parent_surf->resource,
|
||||||
|
@@ -337,13 +337,13 @@ meta_wayland_init (void)
|
|||||||
meta_wayland_pointer_gestures_init (compositor);
|
meta_wayland_pointer_gestures_init (compositor);
|
||||||
meta_wayland_seat_init (compositor);
|
meta_wayland_seat_init (compositor);
|
||||||
|
|
||||||
|
if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
|
||||||
|
g_error ("Failed to start X Wayland");
|
||||||
|
|
||||||
compositor->display_name = wl_display_add_socket_auto (compositor->wayland_display);
|
compositor->display_name = wl_display_add_socket_auto (compositor->wayland_display);
|
||||||
if (compositor->display_name == NULL)
|
if (compositor->display_name == NULL)
|
||||||
g_error ("Failed to create socket");
|
g_error ("Failed to create socket");
|
||||||
|
|
||||||
if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
|
|
||||||
g_error ("Failed to start X Wayland");
|
|
||||||
|
|
||||||
set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
|
set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
|
||||||
set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
|
set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
|
||||||
}
|
}
|
||||||
|
@@ -182,6 +182,8 @@ argbdata_to_surface (gulong *argb_data, int w, int h)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cairo_surface_mark_dirty (surface);
|
||||||
|
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1843,7 +1843,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
|||||||
{ display->atom__NET_WM_WINDOW_TYPE, META_PROP_VALUE_ATOM_LIST, reload_net_wm_window_type, LOAD_INIT | INCLUDE_OR | FORCE_INIT },
|
{ display->atom__NET_WM_WINDOW_TYPE, META_PROP_VALUE_ATOM_LIST, reload_net_wm_window_type, LOAD_INIT | INCLUDE_OR | FORCE_INIT },
|
||||||
{ display->atom__NET_WM_STRUT, META_PROP_VALUE_INVALID, reload_struts, NONE },
|
{ display->atom__NET_WM_STRUT, META_PROP_VALUE_INVALID, reload_struts, NONE },
|
||||||
{ display->atom__NET_WM_STRUT_PARTIAL, META_PROP_VALUE_INVALID, reload_struts, NONE },
|
{ display->atom__NET_WM_STRUT_PARTIAL, META_PROP_VALUE_INVALID, reload_struts, NONE },
|
||||||
{ display->atom__NET_WM_BYPASS_COMPOSITOR, META_PROP_VALUE_CARDINAL, reload_bypass_compositor, NONE },
|
{ display->atom__NET_WM_BYPASS_COMPOSITOR, META_PROP_VALUE_CARDINAL, reload_bypass_compositor, LOAD_INIT | INCLUDE_OR },
|
||||||
{ display->atom__NET_WM_WINDOW_OPACITY, META_PROP_VALUE_CARDINAL, reload_window_opacity, LOAD_INIT | INCLUDE_OR },
|
{ display->atom__NET_WM_WINDOW_OPACITY, META_PROP_VALUE_CARDINAL, reload_window_opacity, LOAD_INIT | INCLUDE_OR },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
@@ -542,13 +542,10 @@ meta_window_x11_manage (MetaWindow *window)
|
|||||||
* For normal windows, do a full ConfigureRequest based on the
|
* For normal windows, do a full ConfigureRequest based on the
|
||||||
* window hints, as that's what the ICCCM says to do.
|
* window hints, as that's what the ICCCM says to do.
|
||||||
*/
|
*/
|
||||||
|
priv->client_rect = window->rect;
|
||||||
|
window->buffer_rect = window->rect;
|
||||||
|
|
||||||
if (window->override_redirect)
|
if (!window->override_redirect)
|
||||||
{
|
|
||||||
priv->client_rect = window->rect;
|
|
||||||
window->buffer_rect = window->rect;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
MetaRectangle rect;
|
MetaRectangle rect;
|
||||||
MetaMoveResizeFlags flags;
|
MetaMoveResizeFlags flags;
|
||||||
@@ -1735,9 +1732,9 @@ meta_window_x11_update_input_region (MetaWindow *window)
|
|||||||
region = cairo_region_create ();
|
region = cairo_region_create ();
|
||||||
}
|
}
|
||||||
else if (n_rects == 1 &&
|
else if (n_rects == 1 &&
|
||||||
(rects[0].x == 0 ||
|
(rects[0].x == 0 &&
|
||||||
rects[0].y == 0 ||
|
rects[0].y == 0 &&
|
||||||
rects[0].width == priv->client_rect.width ||
|
rects[0].width == priv->client_rect.width &&
|
||||||
rects[0].height == priv->client_rect.height))
|
rects[0].height == priv->client_rect.height))
|
||||||
{
|
{
|
||||||
/* This is the bounding region case. Keep the
|
/* This is the bounding region case. Keep the
|
||||||
|
Reference in New Issue
Block a user