Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
790269db95 | |||
cb82bd8afa | |||
b1e06ed110 | |||
fabe66e65f | |||
4a965a37d1 | |||
302ff7b95a | |||
e2e241340c | |||
461aea47dd | |||
d87093fe29 | |||
0cde7879d6 | |||
89ffcee7ca | |||
1250afef7b | |||
3a577edaa7 | |||
48dfde2073 | |||
4a41d415f8 | |||
1fb7ca398d | |||
2b79935fd8 | |||
e3c915350e |
14
NEWS
14
NEWS
@ -1,3 +1,17 @@
|
||||
3.14.0
|
||||
======
|
||||
* Fix placement of popup windows on wayland [Jasper; #736812]
|
||||
* Only increment serial once per event [Jasper; #736840]
|
||||
* Fix window positioning regression with non-GTK+ toolkits [Owen; #736719]
|
||||
|
||||
Contributors:
|
||||
Jasper St. Pierre, Owen W. Taylor
|
||||
|
||||
Translations:
|
||||
Saibal Ray [bn_IN], Dušan Kazik [sk], Manoj Kumar Giri [or],
|
||||
Christian Kirbach [de], Ask H. Larsen [da], YunQiang Su [zh_CN],
|
||||
Bernd Homuth [de], Shankar Prasad [kn], Petr Kovar [cs], Rajesh Ranjan [hi]
|
||||
|
||||
3.13.92
|
||||
=======
|
||||
* Rewrite background code [Owen; #735637, #736568]
|
||||
|
@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [13])
|
||||
m4_define([mutter_micro_version], [92])
|
||||
m4_define([mutter_minor_version], [14])
|
||||
m4_define([mutter_micro_version], [0])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
1645
po/bn_IN.po
1645
po/bn_IN.po
File diff suppressed because it is too large
Load Diff
1306
po/zh_CN.po
1306
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -653,9 +653,6 @@ void meta_window_set_transient_for (MetaWindow *window,
|
||||
void meta_window_set_opacity (MetaWindow *window,
|
||||
guint8 opacity);
|
||||
|
||||
void meta_window_set_custom_frame_extents (MetaWindow *window,
|
||||
GtkBorder *extents);
|
||||
|
||||
void meta_window_handle_enter (MetaWindow *window,
|
||||
guint32 timestamp,
|
||||
guint root_x,
|
||||
|
@ -7887,24 +7887,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_set_custom_frame_extents (MetaWindow *window,
|
||||
GtkBorder *extents)
|
||||
{
|
||||
if (extents)
|
||||
{
|
||||
window->has_custom_frame_extents = TRUE;
|
||||
window->custom_frame_extents = *extents;
|
||||
}
|
||||
else
|
||||
{
|
||||
window->has_custom_frame_extents = FALSE;
|
||||
memset (&window->custom_frame_extents, 0, sizeof (window->custom_frame_extents));
|
||||
}
|
||||
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_window_can_maximize (MetaWindow *window)
|
||||
{
|
||||
|
@ -273,14 +273,19 @@ notify_modifiers (MetaWaylandKeyboard *keyboard)
|
||||
state = keyboard->xkb_info.state;
|
||||
|
||||
l = &keyboard->focus_resource_list;
|
||||
wl_resource_for_each (resource, l)
|
||||
if (!wl_list_empty (l))
|
||||
{
|
||||
wl_keyboard_send_modifiers (resource,
|
||||
wl_display_next_serial (keyboard->display),
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
|
||||
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
|
||||
uint32_t serial = wl_display_next_serial (keyboard->display);
|
||||
|
||||
wl_resource_for_each (resource, l)
|
||||
{
|
||||
wl_keyboard_send_modifiers (resource,
|
||||
serial,
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
|
||||
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
|
||||
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ default_grab_button (MetaWaylandPointerGrab *grab,
|
||||
event_type = clutter_event_type (event);
|
||||
|
||||
l = &grab->pointer->focus_resource_list;
|
||||
wl_resource_for_each(resource, l)
|
||||
if (!wl_list_empty (l))
|
||||
{
|
||||
struct wl_client *client = wl_resource_get_client (pointer->focus_surface->resource);
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
@ -168,9 +168,13 @@ default_grab_button (MetaWaylandPointerGrab *grab,
|
||||
}
|
||||
|
||||
serial = wl_display_next_serial (display);
|
||||
wl_pointer_send_button (resource, serial,
|
||||
clutter_event_get_time (event), button,
|
||||
event_type == CLUTTER_BUTTON_PRESS ? 1 : 0);
|
||||
|
||||
wl_resource_for_each(resource, l)
|
||||
{
|
||||
wl_pointer_send_button (resource, serial,
|
||||
clutter_event_get_time (event), button,
|
||||
event_type == CLUTTER_BUTTON_PRESS ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer->button_count == 0 && event_type == CLUTTER_BUTTON_RELEASE)
|
||||
|
@ -188,21 +188,20 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we get a 0x0 size, this means that we're trying to resize
|
||||
* a surface that doesn't have any buffer attached. This can happen
|
||||
* when a client requests an xdg surface before bringing it up.
|
||||
* The constrained_rect will be 1x1 because of how our constraints
|
||||
* code works, and sending that to the window would cause it to
|
||||
* redraw itself, so just don't send anything. Pretend like this
|
||||
* move_resize never happened.
|
||||
*/
|
||||
if (unconstrained_rect.width == 0 &&
|
||||
unconstrained_rect.height == 0)
|
||||
return;
|
||||
|
||||
if (constrained_rect.width != window->rect.width ||
|
||||
constrained_rect.height != window->rect.height)
|
||||
{
|
||||
/* If we get a 0x0 size, this means that we're trying to resize
|
||||
* a surface that doesn't have any buffer attached. This can happen
|
||||
* when a client requests an xdg surface before bringing it up.
|
||||
* The constrained_rect will be 1x1 because of how our constraints
|
||||
* code works, and sending that to the window would cause it to
|
||||
* redraw itself, so just don't send anything.
|
||||
*/
|
||||
if (unconstrained_rect.width == 0 &&
|
||||
unconstrained_rect.height == 0)
|
||||
return;
|
||||
|
||||
meta_wayland_surface_configure_notify (window->surface,
|
||||
constrained_rect.width,
|
||||
constrained_rect.height,
|
||||
|
@ -338,6 +338,52 @@ reload_icon_geometry (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_border_equal (GtkBorder *a,
|
||||
GtkBorder *b)
|
||||
{
|
||||
return (a->left == b->left &&
|
||||
a->right == b->right &&
|
||||
a->top == b->top &&
|
||||
a->bottom == b->bottom);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_set_custom_frame_extents (MetaWindow *window,
|
||||
GtkBorder *extents,
|
||||
gboolean is_initial)
|
||||
{
|
||||
if (extents)
|
||||
{
|
||||
if (window->has_custom_frame_extents && gtk_border_equal (&window->custom_frame_extents, extents))
|
||||
return;
|
||||
|
||||
window->has_custom_frame_extents = TRUE;
|
||||
window->custom_frame_extents = *extents;
|
||||
|
||||
/* If we're setting the frame extents on map, then this is telling
|
||||
* us to adjust our understanding of the frame rect to match what
|
||||
* GTK+ thinks it is. Future changes to the frame extents should
|
||||
* trigger a resize and send a ConfigureRequest to the application.
|
||||
*/
|
||||
if (is_initial)
|
||||
{
|
||||
meta_window_client_rect_to_frame_rect (window, &window->rect, &window->rect);
|
||||
meta_window_client_rect_to_frame_rect (window, &window->unconstrained_rect, &window->unconstrained_rect);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!window->has_custom_frame_extents)
|
||||
return;
|
||||
|
||||
window->has_custom_frame_extents = FALSE;
|
||||
memset (&window->custom_frame_extents, 0, sizeof (window->custom_frame_extents));
|
||||
}
|
||||
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
}
|
||||
|
||||
static void
|
||||
reload_gtk_frame_extents (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
@ -357,16 +403,13 @@ reload_gtk_frame_extents (MetaWindow *window,
|
||||
extents.right = (int)value->v.cardinal_list.cardinals[1];
|
||||
extents.top = (int)value->v.cardinal_list.cardinals[2];
|
||||
extents.bottom = (int)value->v.cardinal_list.cardinals[3];
|
||||
meta_window_set_custom_frame_extents (window, &extents);
|
||||
meta_window_set_custom_frame_extents (window, &extents, initial);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_set_custom_frame_extents (window, NULL);
|
||||
meta_window_set_custom_frame_extents (window, NULL, initial);
|
||||
}
|
||||
|
||||
if (!initial)
|
||||
meta_window_queue(window, META_QUEUE_MOVE_RESIZE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -214,8 +214,29 @@ send_configure_notify (MetaWindow *window)
|
||||
event.xconfigure.display = window->display->xdisplay;
|
||||
event.xconfigure.event = window->xwindow;
|
||||
event.xconfigure.window = window->xwindow;
|
||||
event.xconfigure.x = window->rect.x - priv->border_width;
|
||||
event.xconfigure.y = window->rect.y - priv->border_width;
|
||||
event.xconfigure.x = priv->client_rect.x - priv->border_width;
|
||||
event.xconfigure.y = priv->client_rect.y - priv->border_width;
|
||||
if (window->frame)
|
||||
{
|
||||
if (window->withdrawn)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
/* We reparent the client window and put it to the position
|
||||
* where the visible top-left of the frame window currently is.
|
||||
*/
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
event.xconfigure.x = window->frame->rect.x + borders.invisible.left;
|
||||
event.xconfigure.y = window->frame->rect.y + borders.invisible.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Need to be in root window coordinates */
|
||||
event.xconfigure.x += window->frame->rect.x;
|
||||
event.xconfigure.y += window->frame->rect.y;
|
||||
}
|
||||
}
|
||||
event.xconfigure.width = priv->client_rect.width;
|
||||
event.xconfigure.height = priv->client_rect.height;
|
||||
event.xconfigure.border_width = priv->border_width; /* requested not actual */
|
||||
@ -249,6 +270,17 @@ adjust_for_gravity (MetaWindow *window,
|
||||
int frame_width, frame_height;
|
||||
MetaFrameBorders borders;
|
||||
|
||||
/* We're computing position to pass to window_move, which is
|
||||
* the position of the client window (StaticGravity basically)
|
||||
*
|
||||
* (see WM spec description of gravity computation, but note that
|
||||
* their formulas assume we're honoring the border width, rather
|
||||
* than compensating for having turned it off)
|
||||
*/
|
||||
|
||||
if (gravity == StaticGravity)
|
||||
return;
|
||||
|
||||
if (coords_assume_border)
|
||||
bw = priv->border_width;
|
||||
else
|
||||
@ -261,14 +293,6 @@ adjust_for_gravity (MetaWindow *window,
|
||||
frame_width = child_x + rect->width + borders.visible.right;
|
||||
frame_height = child_y + rect->height + borders.visible.bottom;
|
||||
|
||||
/* We're computing position to pass to window_move, which is
|
||||
* the position of the client window (StaticGravity basically)
|
||||
*
|
||||
* (see WM spec description of gravity computation, but note that
|
||||
* their formulas assume we're honoring the border width, rather
|
||||
* than compensating for having turned it off)
|
||||
*/
|
||||
|
||||
/* Calculate the the reference point, which is the corner of the
|
||||
* outer window specified by the gravity. So, NorthEastGravity
|
||||
* would have the reference point as the top-right corner of the
|
||||
|
Reference in New Issue
Block a user