Compare commits

...

18 Commits

Author SHA1 Message Date
790269db95 Bump version to 3.14.0
Update NEWS.
2014-09-22 20:12:08 +02:00
cb82bd8afa Updated Hindi translation 2014-09-22 13:23:07 +00:00
b1e06ed110 Update Czech translation 2014-09-22 15:02:04 +02:00
fabe66e65f Updated Kannada translation 2014-09-22 05:14:51 +00:00
4a965a37d1 Updated German translation 2014-09-21 19:20:16 +00:00
302ff7b95a update zh_CN translation 2014-09-21 10:15:01 +08:00
e2e241340c Updated Danish translation 2014-09-20 17:22:51 +02:00
461aea47dd window: Adjust the frame rect when _GTK_FRAME_EXTENTS is set on map 2014-09-19 17:35:38 -06:00
d87093fe29 window: Don't queue move/resizes if the extents are the same
GTK+ sets the frame extents on every allocation, so don't bother doing
any extra work if things are the same.
2014-09-19 17:35:38 -06:00
0cde7879d6 window: Move set_custom_frame_extents to be X11-only
Wayland doesn't use custom frame extents anymore -- it uses a full
geometry description.
2014-09-19 17:35:38 -06:00
89ffcee7ca Fix computation of window positions for StaticGravity
When adjust_for_gravity() was simplified (01b6445708), the correct
handling of StaticGravity dropped out - fix adjust_for_gravity() to do
nothing in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=736719
2014-09-19 15:41:22 -04:00
1250afef7b Revert "window-x11: Fix the coordinates we use in the synthetic ConfigureNotify"
The coordinates in ConfigureNotify *should* be the coordinates of the
client window; using the coordinates of the frame window compensated for
a problem with the interpretation of StaticGravity for some clients but
broke other clients.

This reverts commit f4f70afe31.

https://bugzilla.gnome.org/show_bug.cgi?id=736719
2014-09-19 15:41:22 -04:00
3a577edaa7 Updated German translation 2014-09-18 21:55:42 +00:00
48dfde2073 keyboard/pointer: Calculate the serial once per event
Some applications, like totem, create keyboard/pointer objects from the
same client, and expect it to work. We made this work a while ago, but
due to an oversight in the code, we increment the serial on button press
for every resource that we need to send events to.

Since operations like move/resize use the grab serial of the devices to
determine whether the operation is exact, we need to make sure the same
serial goes to all devices.

Restructure the code so that all that's in the resource loop is the
sending of the event -- all the calculation that's needed happens
outside.

This fixes moving / resizing the Totem window not working sometimes.

https://bugzilla.gnome.org/show_bug.cgi?id=736840
2014-09-18 09:15:13 -06:00
4a41d415f8 wayland: Fix the placement of popup windows
The fix in d61dde1 regressed the position of popup windows, since the
size was 0x0 when we wanted to do a sole move. Only fizzle out in the
path where we actually *do* resize.

https://bugzilla.gnome.org/show_bug.cgi?id=736812
2014-09-17 17:42:37 +02:00
1fb7ca398d Updated Oriya translation 2014-09-17 11:27:43 +00:00
2b79935fd8 Updated Slovak translation 2014-09-17 09:10:51 +00:00
e3c915350e Updated Bengali (India) translation 2014-09-17 06:30:41 +00:00
18 changed files with 6074 additions and 7389 deletions

14
NEWS
View File

@ -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]

View File

@ -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])

File diff suppressed because it is too large Load Diff

1284
po/cs.po

File diff suppressed because it is too large Load Diff

1298
po/da.po

File diff suppressed because it is too large Load Diff

1530
po/de.po

File diff suppressed because it is too large Load Diff

1942
po/hi.po

File diff suppressed because it is too large Load Diff

1966
po/kn.po

File diff suppressed because it is too large Load Diff

1800
po/or.po

File diff suppressed because it is too large Load Diff

502
po/sk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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,

View File

@ -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)
{

View File

@ -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));
}
}
}

View File

@ -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)

View File

@ -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,

View File

@ -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

View File

@ -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