Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5d3079c8a | ||
|
|
18a0c10aed | ||
|
|
8a35f8939d | ||
|
|
5b675fdd39 | ||
|
|
3aa295ba86 | ||
|
|
16629c289f | ||
|
|
4bf5e27c80 | ||
|
|
f4ddff14b9 | ||
|
|
59908a01c1 | ||
|
|
6781709a75 | ||
|
|
17185452c6 | ||
|
|
534774a72f | ||
|
|
efefb40e70 | ||
|
|
ca4e1fd4c9 | ||
|
|
74fb5a83dd | ||
|
|
02ecca502e | ||
|
|
e36eb3e91a | ||
|
|
de6d9591c4 | ||
|
|
a20401782e | ||
|
|
79ea9f0b0f | ||
|
|
7b36dcf4a0 |
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
||||
3.8.4
|
||||
=====
|
||||
* Workaround failure to bring back shell interface after fullscreen game in some situations [Adel; #701224]
|
||||
* Fix sluggish and stuck pointers moving windows [Adel, Jasper: #699777]
|
||||
* Reduce log spew [Adel, Jasper; #702564, #703970]
|
||||
* Touch screen fixes [Jasper: #697192]
|
||||
* Fix rendering of large background images [Jasper, Ray: #702283]
|
||||
|
||||
Contributors:
|
||||
Adel Gadllah, Jasper St. Pierre, Ray Strode
|
||||
|
||||
3.8.3
|
||||
=====
|
||||
* Add support for string-array preferences [Florian; #700223]
|
||||
|
||||
@@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [8])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
m4_define([mutter_micro_version], [4])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
||||
1282
po/zh_CN.po
1282
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@@ -639,6 +639,9 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
XISetMask (mask.mask, XI_FocusIn);
|
||||
XISetMask (mask.mask, XI_FocusOut);
|
||||
XISetMask (mask.mask, XI_Motion);
|
||||
XIClearMask (mask.mask, XI_TouchBegin);
|
||||
XIClearMask (mask.mask, XI_TouchEnd);
|
||||
XIClearMask (mask.mask, XI_TouchUpdate);
|
||||
XISelectEvents (xdisplay, xwin, &mask, 1);
|
||||
|
||||
event_mask = ExposureMask | PropertyChangeMask | StructureNotifyMask;
|
||||
@@ -1567,8 +1570,10 @@ void
|
||||
meta_enable_unredirect_for_screen (MetaScreen *screen)
|
||||
{
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
if (info != NULL)
|
||||
info->disable_unredirect_count = MAX(0, info->disable_unredirect_count - 1);
|
||||
if (info != NULL && info->disable_unredirect_count == 0)
|
||||
g_warning ("Called enable_unredirect_for_screen while unredirection is enabled.");
|
||||
if (info != NULL && info->disable_unredirect_count > 0)
|
||||
info->disable_unredirect_count = info->disable_unredirect_count - 1;
|
||||
}
|
||||
|
||||
#define FLASH_TIME_MS 50
|
||||
|
||||
@@ -891,7 +891,7 @@ meta_background_load_gradient (MetaBackground *self,
|
||||
pixels[7] = second_color->alpha;
|
||||
|
||||
texture = cogl_texture_new_from_data (width, height,
|
||||
COGL_TEXTURE_NO_SLICING,
|
||||
COGL_TEXTURE_NONE,
|
||||
COGL_PIXEL_FORMAT_RGBA_8888,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
4,
|
||||
@@ -1031,7 +1031,6 @@ meta_background_load_file_finish (MetaBackground *self,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
static CoglUserDataKey key;
|
||||
GTask *task;
|
||||
LoadFileTaskData *task_data;
|
||||
CoglTexture *texture;
|
||||
@@ -1077,12 +1076,6 @@ meta_background_load_file_finish (MetaBackground *self,
|
||||
goto out;
|
||||
}
|
||||
|
||||
cogl_object_set_user_data (COGL_OBJECT (texture),
|
||||
&key,
|
||||
g_object_ref (pixbuf),
|
||||
(CoglUserDataDestroyCallback)
|
||||
g_object_unref);
|
||||
|
||||
ensure_pipeline (self);
|
||||
unset_texture (self);
|
||||
set_style (self, task_data->style);
|
||||
|
||||
@@ -250,11 +250,30 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
/* Adapted from clutter_actor_update_default_paint_volume() */
|
||||
static gboolean
|
||||
meta_window_group_get_paint_volume (ClutterActor *actor,
|
||||
meta_window_group_get_paint_volume (ClutterActor *self,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||
ClutterActorIter iter;
|
||||
ClutterActor *child;
|
||||
|
||||
clutter_actor_iter_init (&iter, self);
|
||||
while (clutter_actor_iter_next (&iter, &child))
|
||||
{
|
||||
const ClutterPaintVolume *child_volume;
|
||||
|
||||
if (!CLUTTER_ACTOR_IS_MAPPED (child))
|
||||
continue;
|
||||
|
||||
child_volume = clutter_actor_get_transformed_paint_volume (child, self);
|
||||
if (child_volume == NULL)
|
||||
return FALSE;
|
||||
|
||||
clutter_paint_volume_union (volume, child_volume);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -3557,6 +3557,12 @@ meta_spew_event (MetaDisplay *display,
|
||||
if (event->type == (display->damage_event_base + XDamageNotify))
|
||||
return;
|
||||
|
||||
if (event->type == (display->xsync_event_base + XSyncAlarmNotify))
|
||||
return;
|
||||
|
||||
if (event->type == PropertyNotify && event->xproperty.atom == display->atom__NET_WM_USER_TIME)
|
||||
return;
|
||||
|
||||
input_event = get_input_event (display, event);
|
||||
|
||||
if (input_event)
|
||||
|
||||
@@ -187,6 +187,9 @@ MetaWindow* meta_screen_get_mouse_window (MetaScreen *scre
|
||||
MetaWindow *not_this_one);
|
||||
|
||||
const MetaMonitorInfo* meta_screen_get_current_monitor_info (MetaScreen *screen);
|
||||
const MetaMonitorInfo* meta_screen_get_current_monitor_info_for_pos (MetaScreen *screen,
|
||||
int x,
|
||||
int y);
|
||||
const MetaMonitorInfo* meta_screen_get_monitor_for_rect (MetaScreen *screen,
|
||||
MetaRectangle *rect);
|
||||
const MetaMonitorInfo* meta_screen_get_monitor_for_window (MetaScreen *screen,
|
||||
|
||||
@@ -2216,6 +2216,65 @@ meta_screen_get_current_monitor_info (MetaScreen *screen)
|
||||
return &screen->monitor_infos[monitor_index];
|
||||
}
|
||||
|
||||
const MetaMonitorInfo*
|
||||
meta_screen_get_current_monitor_info_for_pos (MetaScreen *screen,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
int monitor_index;
|
||||
monitor_index = meta_screen_get_current_monitor_for_pos (screen, x, y);
|
||||
return &screen->monitor_infos[monitor_index];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* meta_screen_get_current_monitor_for_pos:
|
||||
* @screen: a #MetaScreen
|
||||
* @x: The x coordinate
|
||||
* @y: The y coordinate
|
||||
*
|
||||
* Gets the index of the monitor that contains the passed coordinates.
|
||||
*
|
||||
* Return value: a monitor index
|
||||
*/
|
||||
int
|
||||
meta_screen_get_current_monitor_for_pos (MetaScreen *screen,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
if (screen->n_monitor_infos == 1)
|
||||
return 0;
|
||||
else if (screen->display->monitor_cache_invalidated)
|
||||
{
|
||||
int i;
|
||||
MetaRectangle pointer_position;
|
||||
pointer_position.x = x;
|
||||
pointer_position.y = y;
|
||||
pointer_position.width = pointer_position.height = 1;
|
||||
|
||||
screen->display->monitor_cache_invalidated = FALSE;
|
||||
screen->last_monitor_index = 0;
|
||||
|
||||
for (i = 0; i < screen->n_monitor_infos; i++)
|
||||
{
|
||||
if (meta_rectangle_contains_rect (&screen->monitor_infos[i].rect,
|
||||
&pointer_position))
|
||||
{
|
||||
screen->last_monitor_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"Rechecked current monitor, now %d\n",
|
||||
screen->last_monitor_index);
|
||||
|
||||
}
|
||||
|
||||
return screen->last_monitor_index;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* meta_screen_get_current_monitor:
|
||||
* @screen: a #MetaScreen
|
||||
@@ -2241,11 +2300,7 @@ meta_screen_get_current_monitor (MetaScreen *screen)
|
||||
XIButtonState buttons;
|
||||
XIModifierState mods;
|
||||
XIGroupState group;
|
||||
int i;
|
||||
MetaRectangle pointer_position;
|
||||
|
||||
screen->display->monitor_cache_invalidated = FALSE;
|
||||
|
||||
XIQueryPointer (screen->display->xdisplay,
|
||||
META_VIRTUAL_CORE_POINTER_ID,
|
||||
screen->xroot,
|
||||
@@ -2260,24 +2315,7 @@ meta_screen_get_current_monitor (MetaScreen *screen)
|
||||
&group);
|
||||
free (buttons.mask);
|
||||
|
||||
pointer_position.x = root_x_return;
|
||||
pointer_position.y = root_y_return;
|
||||
pointer_position.width = pointer_position.height = 1;
|
||||
|
||||
screen->last_monitor_index = 0;
|
||||
for (i = 0; i < screen->n_monitor_infos; i++)
|
||||
{
|
||||
if (meta_rectangle_contains_rect (&screen->monitor_infos[i].rect,
|
||||
&pointer_position))
|
||||
{
|
||||
screen->last_monitor_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"Rechecked current monitor, now %d\n",
|
||||
screen->last_monitor_index);
|
||||
meta_screen_get_current_monitor_for_pos (screen, root_x_return, root_y_return);
|
||||
}
|
||||
|
||||
return screen->last_monitor_index;
|
||||
@@ -3001,7 +3039,7 @@ meta_screen_resize (MetaScreen *screen,
|
||||
|
||||
/* Fix up monitor for all windows on this screen */
|
||||
windows = meta_display_list_windows (screen->display,
|
||||
META_LIST_DEFAULT);
|
||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
|
||||
for (tmp = windows; tmp != NULL; tmp = tmp->next)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
@@ -145,6 +145,8 @@ static void meta_window_move_between_rects (MetaWindow *window,
|
||||
static void unmaximize_window_before_freeing (MetaWindow *window);
|
||||
static void unminimize_window_and_all_transient_parents (MetaWindow *window);
|
||||
|
||||
static void meta_window_update_monitor (MetaWindow *window);
|
||||
|
||||
/* Idle handlers for the three queues (run with meta_later_add()). The
|
||||
* "data" parameter in each case will be a GINT_TO_POINTER of the
|
||||
* index into the queue arrays to use.
|
||||
@@ -4788,6 +4790,12 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
if (window->type == META_WINDOW_DESKTOP)
|
||||
return;
|
||||
|
||||
if (window->override_redirect)
|
||||
{
|
||||
meta_window_update_monitor (window);
|
||||
return;
|
||||
}
|
||||
|
||||
old = window->monitor;
|
||||
|
||||
/* Start on primary */
|
||||
@@ -6626,6 +6634,41 @@ meta_window_change_workspace_by_index (MetaWindow *window,
|
||||
#define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10
|
||||
#define _NET_WM_MOVERESIZE_CANCEL 11
|
||||
|
||||
static int
|
||||
query_pressed_buttons (MetaWindow *window)
|
||||
{
|
||||
double x, y, query_root_x, query_root_y;
|
||||
Window root, child;
|
||||
XIButtonState buttons;
|
||||
XIModifierState mods;
|
||||
XIGroupState group;
|
||||
int button = 0;
|
||||
|
||||
meta_error_trap_push (window->display);
|
||||
XIQueryPointer (window->display->xdisplay,
|
||||
META_VIRTUAL_CORE_POINTER_ID,
|
||||
window->xwindow,
|
||||
&root, &child,
|
||||
&query_root_x, &query_root_y,
|
||||
&x, &y,
|
||||
&buttons, &mods, &group);
|
||||
|
||||
if (meta_error_trap_pop_with_return (window->display) != Success)
|
||||
goto out;
|
||||
|
||||
if (XIMaskIsSet (buttons.mask, Button1))
|
||||
button |= 1 << 1;
|
||||
if (XIMaskIsSet (buttons.mask, Button2))
|
||||
button |= 1 << 2;
|
||||
if (XIMaskIsSet (buttons.mask, Button3))
|
||||
button |= 1 << 3;
|
||||
|
||||
free (buttons.mask);
|
||||
|
||||
out:
|
||||
return button;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_window_client_message (MetaWindow *window,
|
||||
XEvent *event)
|
||||
@@ -6984,56 +7027,58 @@ meta_window_client_message (MetaWindow *window,
|
||||
(op != META_GRAB_OP_MOVING &&
|
||||
op != META_GRAB_OP_KEYBOARD_MOVING))))
|
||||
{
|
||||
/*
|
||||
* the button SHOULD already be included in the message
|
||||
*/
|
||||
int button_mask;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Beginning move/resize with button = %d\n", button);
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
FALSE,
|
||||
frame_action,
|
||||
button, 0,
|
||||
timestamp,
|
||||
x_root,
|
||||
y_root);
|
||||
|
||||
button_mask = query_pressed_buttons (window);
|
||||
|
||||
if (button == 0)
|
||||
{
|
||||
double x, y, query_root_x, query_root_y;
|
||||
Window root, child;
|
||||
XIButtonState buttons;
|
||||
XIModifierState mods;
|
||||
XIGroupState group;
|
||||
|
||||
/* The race conditions in this _NET_WM_MOVERESIZE thing
|
||||
* are mind-boggling
|
||||
/*
|
||||
* the button SHOULD already be included in the message
|
||||
*/
|
||||
meta_error_trap_push (window->display);
|
||||
XIQueryPointer (window->display->xdisplay,
|
||||
META_VIRTUAL_CORE_POINTER_ID,
|
||||
window->xwindow,
|
||||
&root, &child,
|
||||
&query_root_x, &query_root_y,
|
||||
&x, &y,
|
||||
&buttons, &mods, &group);
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
if (XIMaskIsSet (buttons.mask, Button1))
|
||||
if ((button_mask & (1 << 1)) != 0)
|
||||
button = 1;
|
||||
else if (XIMaskIsSet (buttons.mask, Button2))
|
||||
else if ((button_mask & (1 << 2)) != 0)
|
||||
button = 2;
|
||||
else if (XIMaskIsSet (buttons.mask, Button3))
|
||||
else if ((button_mask & (1 << 3)) != 0)
|
||||
button = 3;
|
||||
|
||||
if (button != 0)
|
||||
window->display->grab_button = button;
|
||||
else
|
||||
button = 0;
|
||||
|
||||
free (buttons.mask);
|
||||
meta_display_end_grab_op (window->display,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
if (button != 0)
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Beginning move/resize with button = %d\n", button);
|
||||
meta_display_begin_grab_op (window->display,
|
||||
window->screen,
|
||||
window,
|
||||
op,
|
||||
FALSE,
|
||||
frame_action,
|
||||
button, 0,
|
||||
timestamp,
|
||||
x_root,
|
||||
y_root);
|
||||
/* There is a potential race here. If the user presses and
|
||||
* releases their mouse button very fast, it's possible for
|
||||
* both the ButtonPress and ButtonRelease to be sent to the
|
||||
* client before it can get a chance to send _NET_WM_MOVERESIZE
|
||||
* to us. When that happens, we'll become stuck in a grab
|
||||
* state, as we haven't received a ButtonRelease to cancel the
|
||||
* grab.
|
||||
*
|
||||
* We can solve this by querying after we take the explicit
|
||||
* pointer grab -- if the button isn't pressed, we cancel the
|
||||
* drag immediately.
|
||||
*/
|
||||
|
||||
if ((button_mask & (1 << button)) == 0)
|
||||
meta_display_end_grab_op (window->display, timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9009,7 +9054,7 @@ update_move (MetaWindow *window,
|
||||
* refers to the monitor which contains the largest part of the window,
|
||||
* the latter to the one where the pointer is located.
|
||||
*/
|
||||
monitor = meta_screen_get_current_monitor_info (window->screen);
|
||||
monitor = meta_screen_get_current_monitor_info_for_pos (window->screen, x, y);
|
||||
meta_window_get_work_area_for_monitor (window,
|
||||
monitor->number,
|
||||
&work_area);
|
||||
|
||||
@@ -78,6 +78,7 @@ static void
|
||||
meta_workspace_finalize (GObject *object)
|
||||
{
|
||||
/* Actual freeing done in meta_workspace_remove() for now */
|
||||
G_OBJECT_CLASS (meta_workspace_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -78,6 +78,9 @@ MetaWorkspace * meta_screen_get_active_workspace (MetaScreen *screen);
|
||||
int meta_screen_get_n_monitors (MetaScreen *screen);
|
||||
int meta_screen_get_primary_monitor (MetaScreen *screen);
|
||||
int meta_screen_get_current_monitor (MetaScreen *screen);
|
||||
int meta_screen_get_current_monitor_for_pos (MetaScreen *screen,
|
||||
int x,
|
||||
int y);
|
||||
void meta_screen_get_monitor_geometry (MetaScreen *screen,
|
||||
int monitor,
|
||||
MetaRectangle *geometry);
|
||||
|
||||
Reference in New Issue
Block a user