Compare commits
1 Commits
3.19.1
...
wip/fullsc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
88e466f8a8 |
28
NEWS
28
NEWS
@@ -1,31 +1,3 @@
|
||||
3.19.1
|
||||
======
|
||||
* wayland: Allow to trigger popups through keyboard/touch [Carlos; #756296]
|
||||
* Fix modifiers-only input source switching on Ubuntu [Alberts; #756543]
|
||||
* Misc. bug fixes [Jonas, Rui, Giovanni, Florian; #756675, #756660, #746420,
|
||||
#756548, #756796, #757101, #757148]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Giovanni Campagna, Carlos Garnacho, Rui Matos,
|
||||
Alberts Muktupāvels, Florian Müllner
|
||||
|
||||
Translations:
|
||||
Daniel Șerbănescu [ro]
|
||||
|
||||
3.18.1
|
||||
======
|
||||
* Misc. crash fixes [Jonas, Rui, Carlos, Owen, Florian; #755096, #754979,
|
||||
#755490, #754357, #745785, #756642]
|
||||
* Improve HiDPI support on wayland [Jonas; #755097]
|
||||
* Fix doubly-scaled cursor on XWayland HiDPI [Jonas; #755099]
|
||||
* Stop hiding titlebar buttons in dialogs [Florian; #641630]
|
||||
* Add support for fullscreen/unfullscreen animations [Cosimo; #707248]
|
||||
* Misc. bug fixes [Rui, Colin, Florian; #743339, #752047, #756074, #756649]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Cosimo Cecchi, Carlos Garnacho, Rui Matos, Florian Müllner,
|
||||
Jasper St. Pierre, Colin Walters, Owen W. Taylor
|
||||
|
||||
3.18.0
|
||||
======
|
||||
* Misc. fixes [Florian, Jonas; #753434]
|
||||
|
@@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [19])
|
||||
m4_define([mutter_micro_version], [1])
|
||||
m4_define([mutter_minor_version], [18])
|
||||
m4_define([mutter_micro_version], [0])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@@ -58,7 +58,7 @@ CANBERRA_GTK_VERSION=0.26
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
|
||||
MUTTER_PC_MODULES="
|
||||
gtk+-3.0 >= 3.19.1
|
||||
gtk+-3.0 >= 3.9.11
|
||||
gio-unix-2.0 >= 2.35.1
|
||||
pango >= 1.2.0
|
||||
cairo >= 1.10.0
|
||||
|
@@ -82,7 +82,6 @@ struct _MetaBackendX11Private
|
||||
gchar *keymap_layouts;
|
||||
gchar *keymap_variants;
|
||||
gchar *keymap_options;
|
||||
int locked_group;
|
||||
};
|
||||
typedef struct _MetaBackendX11Private MetaBackendX11Private;
|
||||
|
||||
@@ -298,23 +297,15 @@ handle_host_xevent (MetaBackend *backend,
|
||||
|
||||
if (event->type == priv->xkb_event_base)
|
||||
{
|
||||
XkbEvent *xkb_ev = (XkbEvent *) event;
|
||||
XkbAnyEvent *xkb_ev = (XkbAnyEvent *) event;
|
||||
|
||||
if (xkb_ev->any.device == META_VIRTUAL_CORE_KEYBOARD_ID)
|
||||
if (xkb_ev->device == META_VIRTUAL_CORE_KEYBOARD_ID)
|
||||
{
|
||||
switch (xkb_ev->any.xkb_type)
|
||||
switch (xkb_ev->xkb_type)
|
||||
{
|
||||
case XkbNewKeyboardNotify:
|
||||
case XkbMapNotify:
|
||||
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:
|
||||
break;
|
||||
}
|
||||
@@ -785,7 +776,6 @@ meta_backend_x11_lock_layout_group (MetaBackend *backend,
|
||||
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||
|
||||
priv->locked_group = idx;
|
||||
XkbLockGroup (priv->xdisplay, XkbUseCoreKbd, idx);
|
||||
}
|
||||
|
||||
|
@@ -637,32 +637,6 @@ output_get_connector_type (MetaMonitorManagerXrandr *manager_xrandr,
|
||||
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;
|
||||
}
|
||||
|
||||
static char *
|
||||
get_xmode_name (XRRModeInfo *xmode)
|
||||
{
|
||||
@@ -799,8 +773,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||
MetaOutput *meta_output;
|
||||
|
||||
output = XRRGetOutputInfo (manager_xrandr->xdisplay, resources, resources->outputs[i]);
|
||||
if (!output)
|
||||
continue;
|
||||
|
||||
meta_output = &manager->outputs[n_actual_outputs];
|
||||
|
||||
@@ -808,15 +780,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||
{
|
||||
GBytes *edid;
|
||||
|
||||
/* Get this first so that if there are no valid modes we
|
||||
can immediately skip to the next output without having
|
||||
to unwind all the assignments below. */
|
||||
output_get_modes (manager, meta_output, output);
|
||||
if (meta_output->n_modes == 0)
|
||||
continue;
|
||||
|
||||
meta_output->preferred_mode = meta_output->modes[0];
|
||||
|
||||
meta_output->winsys_id = resources->outputs[i];
|
||||
meta_output->name = g_strdup (output->name);
|
||||
|
||||
@@ -833,6 +796,20 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
|
||||
|
||||
output_get_tile_info (manager_xrandr, meta_output);
|
||||
meta_output->n_modes = output->nmode;
|
||||
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
|
||||
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);
|
||||
|
@@ -1477,11 +1477,42 @@ button_function_from_string (const char *str)
|
||||
return META_BUTTON_FUNCTION_MAXIMIZE;
|
||||
else if (strcmp (str, "close") == 0)
|
||||
return META_BUTTON_FUNCTION_CLOSE;
|
||||
else if (strcmp (str, "shade") == 0)
|
||||
return META_BUTTON_FUNCTION_SHADE;
|
||||
else if (strcmp (str, "above") == 0)
|
||||
return META_BUTTON_FUNCTION_ABOVE;
|
||||
else if (strcmp (str, "stick") == 0)
|
||||
return META_BUTTON_FUNCTION_STICK;
|
||||
else
|
||||
/* don't know; give up */
|
||||
return META_BUTTON_FUNCTION_LAST;
|
||||
}
|
||||
|
||||
static MetaButtonFunction
|
||||
button_opposite_function (MetaButtonFunction ofwhat)
|
||||
{
|
||||
switch (ofwhat)
|
||||
{
|
||||
case META_BUTTON_FUNCTION_SHADE:
|
||||
return META_BUTTON_FUNCTION_UNSHADE;
|
||||
case META_BUTTON_FUNCTION_UNSHADE:
|
||||
return META_BUTTON_FUNCTION_SHADE;
|
||||
|
||||
case META_BUTTON_FUNCTION_ABOVE:
|
||||
return META_BUTTON_FUNCTION_UNABOVE;
|
||||
case META_BUTTON_FUNCTION_UNABOVE:
|
||||
return META_BUTTON_FUNCTION_ABOVE;
|
||||
|
||||
case META_BUTTON_FUNCTION_STICK:
|
||||
return META_BUTTON_FUNCTION_UNSTICK;
|
||||
case META_BUTTON_FUNCTION_UNSTICK:
|
||||
return META_BUTTON_FUNCTION_STICK;
|
||||
|
||||
default:
|
||||
return META_BUTTON_FUNCTION_LAST;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_layout_handler (GVariant *value,
|
||||
gpointer *result,
|
||||
@@ -1525,6 +1556,12 @@ button_layout_handler (GVariant *value,
|
||||
if (i > 0 && strcmp("spacer", buttons[b]) == 0)
|
||||
{
|
||||
new_layout.left_buttons_has_spacer[i-1] = TRUE;
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
{
|
||||
new_layout.left_buttons_has_spacer[i-2] = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1533,6 +1570,11 @@ button_layout_handler (GVariant *value,
|
||||
new_layout.left_buttons[i] = f;
|
||||
used[f] = TRUE;
|
||||
++i;
|
||||
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
new_layout.left_buttons[i++] = f;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1576,6 +1618,11 @@ button_layout_handler (GVariant *value,
|
||||
if (i > 0 && strcmp("spacer", buttons[b]) == 0)
|
||||
{
|
||||
new_layout.right_buttons_has_spacer[i-1] = TRUE;
|
||||
f = button_opposite_function (f);
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
{
|
||||
new_layout.right_buttons_has_spacer[i-2] = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1584,6 +1631,12 @@ button_layout_handler (GVariant *value,
|
||||
new_layout.right_buttons[i] = f;
|
||||
used[f] = TRUE;
|
||||
++i;
|
||||
|
||||
f = button_opposite_function (f);
|
||||
|
||||
if (f != META_BUTTON_FUNCTION_LAST)
|
||||
new_layout.right_buttons[i++] = f;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -3534,7 +3534,10 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
{
|
||||
const MetaMonitorInfo *old, *new;
|
||||
|
||||
if (window->override_redirect || window->type == META_WINDOW_DESKTOP)
|
||||
if (window->type == META_WINDOW_DESKTOP)
|
||||
return;
|
||||
|
||||
if (window->override_redirect)
|
||||
{
|
||||
meta_window_update_monitor (window, FALSE);
|
||||
return;
|
||||
|
@@ -372,6 +372,12 @@ typedef enum
|
||||
* @META_BUTTON_FUNCTION_MINIMIZE: Minimize
|
||||
* @META_BUTTON_FUNCTION_MAXIMIZE: Maximize
|
||||
* @META_BUTTON_FUNCTION_CLOSE: Close
|
||||
* @META_BUTTON_FUNCTION_SHADE: Shade
|
||||
* @META_BUTTON_FUNCTION_ABOVE: Above
|
||||
* @META_BUTTON_FUNCTION_STICK: Stick
|
||||
* @META_BUTTON_FUNCTION_UNSHADE: Unshade
|
||||
* @META_BUTTON_FUNCTION_UNABOVE: Unabove
|
||||
* @META_BUTTON_FUNCTION_UNSTICK: Unstick
|
||||
* @META_BUTTON_FUNCTION_LAST: Marks the end of the #MetaButtonFunction enumeration
|
||||
*
|
||||
* Function a window button can have. Note, you can't add stuff here
|
||||
@@ -384,6 +390,12 @@ typedef enum
|
||||
META_BUTTON_FUNCTION_MINIMIZE,
|
||||
META_BUTTON_FUNCTION_MAXIMIZE,
|
||||
META_BUTTON_FUNCTION_CLOSE,
|
||||
META_BUTTON_FUNCTION_SHADE,
|
||||
META_BUTTON_FUNCTION_ABOVE,
|
||||
META_BUTTON_FUNCTION_STICK,
|
||||
META_BUTTON_FUNCTION_UNSHADE,
|
||||
META_BUTTON_FUNCTION_UNABOVE,
|
||||
META_BUTTON_FUNCTION_UNSTICK,
|
||||
META_BUTTON_FUNCTION_APPMENU,
|
||||
META_BUTTON_FUNCTION_LAST
|
||||
} MetaButtonFunction;
|
||||
@@ -393,10 +405,10 @@ typedef enum
|
||||
/* Keep array size in sync with MAX_BUTTONS_PER_CORNER */
|
||||
/**
|
||||
* MetaButtonLayout:
|
||||
* @left_buttons: (array fixed-size=5):
|
||||
* @right_buttons: (array fixed-size=5):
|
||||
* @left_buttons_has_spacer: (array fixed-size=5):
|
||||
* @right_buttons_has_spacer: (array fixed-size=5):
|
||||
* @left_buttons: (array fixed-size=11):
|
||||
* @right_buttons: (array fixed-size=11):
|
||||
* @left_buttons_has_spacer: (array fixed-size=11):
|
||||
* @right_buttons_has_spacer: (array fixed-size=11):
|
||||
*/
|
||||
typedef struct _MetaButtonLayout MetaButtonLayout;
|
||||
struct _MetaButtonLayout
|
||||
|
@@ -58,7 +58,7 @@ typedef enum {
|
||||
META_SIZE_CHANGE_MAXIMIZE,
|
||||
META_SIZE_CHANGE_UNMAXIMIZE,
|
||||
META_SIZE_CHANGE_FULLSCREEN,
|
||||
META_SIZE_CHANGE_UNFULLSCREEN,
|
||||
META_SIZE_CHANGE_UNFULLSCREEN
|
||||
} MetaSizeChange;
|
||||
|
||||
MetaCompositor *meta_compositor_new (MetaDisplay *display);
|
||||
|
108
src/ui/frames.c
108
src/ui/frames.c
@@ -970,6 +970,12 @@ meta_frame_left_click_event (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
case META_FRAME_CONTROL_APPMENU:
|
||||
frame->grab_button = event->button;
|
||||
@@ -1148,6 +1154,24 @@ handle_button_release_event (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
meta_window_delete (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
meta_window_shade (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
meta_window_unshade (frame->meta_window, event->time);
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
meta_window_make_above (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
meta_window_unmake_above (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
meta_window_stick (frame->meta_window);
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
meta_window_unstick (frame->meta_window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1196,6 +1220,18 @@ meta_ui_frame_update_prelit_control (MetaUIFrame *frame,
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
cursor = META_CURSOR_SE_RESIZE;
|
||||
break;
|
||||
@@ -1234,6 +1270,12 @@ meta_ui_frame_update_prelit_control (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
/* leave control set */
|
||||
break;
|
||||
@@ -1445,6 +1487,24 @@ meta_ui_frame_paint (MetaUIFrame *frame,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
button_type = META_BUTTON_TYPE_MAXIMIZE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
button_type = META_BUTTON_TYPE_SHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
button_type = META_BUTTON_TYPE_UNSHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
button_type = META_BUTTON_TYPE_ABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
button_type = META_BUTTON_TYPE_UNABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
button_type = META_BUTTON_TYPE_STICK;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
button_type = META_BUTTON_TYPE_UNSTICK;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
button_type = META_BUTTON_TYPE_CLOSE;
|
||||
break;
|
||||
@@ -1564,6 +1624,24 @@ control_rect (MetaFrameControl control,
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
rect = &fgeom->max_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
rect = &fgeom->shade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
rect = &fgeom->unshade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
rect = &fgeom->above_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
rect = &fgeom->unabove_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
rect = &fgeom->stick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
rect = &fgeom->unstick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_S:
|
||||
@@ -1648,6 +1726,36 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
|
||||
return META_FRAME_CONTROL_MAXIMIZE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_SHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.above_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_ABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.stick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_STICK;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSTICK;
|
||||
}
|
||||
|
||||
/* South resize always has priority over north resize,
|
||||
* in case of overlap.
|
||||
*/
|
||||
|
@@ -39,6 +39,12 @@ typedef enum
|
||||
META_FRAME_CONTROL_MINIMIZE,
|
||||
META_FRAME_CONTROL_MAXIMIZE,
|
||||
META_FRAME_CONTROL_UNMAXIMIZE,
|
||||
META_FRAME_CONTROL_SHADE,
|
||||
META_FRAME_CONTROL_UNSHADE,
|
||||
META_FRAME_CONTROL_ABOVE,
|
||||
META_FRAME_CONTROL_UNABOVE,
|
||||
META_FRAME_CONTROL_STICK,
|
||||
META_FRAME_CONTROL_UNSTICK,
|
||||
META_FRAME_CONTROL_RESIZE_SE,
|
||||
META_FRAME_CONTROL_RESIZE_S,
|
||||
META_FRAME_CONTROL_RESIZE_SW,
|
||||
|
@@ -115,7 +115,7 @@ struct _MetaFrameGeometry
|
||||
|
||||
/* used for a memset hack */
|
||||
#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, appmenu_rect) + sizeof (MetaButtonSpace) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, unstick_rect) + sizeof (MetaButtonSpace) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
||||
|
||||
/* The button rects (if changed adjust memset hack) */
|
||||
MetaButtonSpace close_rect;
|
||||
@@ -123,6 +123,12 @@ struct _MetaFrameGeometry
|
||||
MetaButtonSpace min_rect;
|
||||
MetaButtonSpace menu_rect;
|
||||
MetaButtonSpace appmenu_rect;
|
||||
MetaButtonSpace shade_rect;
|
||||
MetaButtonSpace above_rect;
|
||||
MetaButtonSpace stick_rect;
|
||||
MetaButtonSpace unshade_rect;
|
||||
MetaButtonSpace unabove_rect;
|
||||
MetaButtonSpace unstick_rect;
|
||||
/* End of button rects (if changed adjust memset hack) */
|
||||
|
||||
/* Saved button layout */
|
||||
@@ -152,6 +158,12 @@ typedef enum
|
||||
META_BUTTON_TYPE_MINIMIZE,
|
||||
META_BUTTON_TYPE_MENU,
|
||||
META_BUTTON_TYPE_APPMENU,
|
||||
META_BUTTON_TYPE_SHADE,
|
||||
META_BUTTON_TYPE_ABOVE,
|
||||
META_BUTTON_TYPE_STICK,
|
||||
META_BUTTON_TYPE_UNSHADE,
|
||||
META_BUTTON_TYPE_UNABOVE,
|
||||
META_BUTTON_TYPE_UNSTICK,
|
||||
META_BUTTON_TYPE_LAST
|
||||
} MetaButtonType;
|
||||
|
||||
|
@@ -177,6 +177,17 @@ rect_for_function (MetaFrameGeometry *fgeom,
|
||||
return &fgeom->close_rect;
|
||||
else
|
||||
return NULL;
|
||||
case META_BUTTON_FUNCTION_STICK:
|
||||
case META_BUTTON_FUNCTION_SHADE:
|
||||
case META_BUTTON_FUNCTION_ABOVE:
|
||||
case META_BUTTON_FUNCTION_UNSTICK:
|
||||
case META_BUTTON_FUNCTION_UNSHADE:
|
||||
case META_BUTTON_FUNCTION_UNABOVE:
|
||||
/* Fringe buttons that used to be supported by theme versions >v1;
|
||||
* if we want to support them again, we need to return the
|
||||
* correspondings rects here
|
||||
*/
|
||||
return NULL;
|
||||
|
||||
case META_BUTTON_FUNCTION_LAST:
|
||||
return NULL;
|
||||
@@ -446,10 +457,22 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
|
||||
}
|
||||
|
||||
/* Otherwise we need to shave out a button. Shave
|
||||
* min, max, close, then menu (menu is most useful);
|
||||
* above, stick, shade, min, max, close, then menu (menu is most useful);
|
||||
* prefer the default button locations.
|
||||
*/
|
||||
if (strip_button (left_func_rects, &n_left, &fgeom->min_rect))
|
||||
if (strip_button (left_func_rects, &n_left, &fgeom->above_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->above_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->stick_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->stick_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->shade_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->shade_rect))
|
||||
continue;
|
||||
else if (strip_button (left_func_rects, &n_left, &fgeom->min_rect))
|
||||
continue;
|
||||
else if (strip_button (right_func_rects, &n_right, &fgeom->min_rect))
|
||||
continue;
|
||||
@@ -620,6 +643,30 @@ get_button_rect (MetaButtonType type,
|
||||
*rect = fgeom->close_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_SHADE:
|
||||
*rect = fgeom->shade_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNSHADE:
|
||||
*rect = fgeom->unshade_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_ABOVE:
|
||||
*rect = fgeom->above_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNABOVE:
|
||||
*rect = fgeom->unabove_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_STICK:
|
||||
*rect = fgeom->stick_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_UNSTICK:
|
||||
*rect = fgeom->unstick_rect.visible;
|
||||
break;
|
||||
|
||||
case META_BUTTON_TYPE_MAXIMIZE:
|
||||
*rect = fgeom->max_rect.visible;
|
||||
break;
|
||||
@@ -843,7 +890,6 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
|
||||
cairo_restore (cr);
|
||||
if (button_class)
|
||||
gtk_style_context_remove_class (style, button_class);
|
||||
gtk_style_context_set_state (style, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -929,7 +975,6 @@ static GtkStyleContext *
|
||||
create_style_context (GType widget_type,
|
||||
GtkStyleContext *parent_style,
|
||||
GtkCssProvider *provider,
|
||||
const char *object_name,
|
||||
const char *first_class,
|
||||
...)
|
||||
{
|
||||
@@ -949,9 +994,6 @@ create_style_context (GType widget_type,
|
||||
|
||||
gtk_widget_path_append_type (path, widget_type);
|
||||
|
||||
if (object_name)
|
||||
gtk_widget_path_iter_set_object_name (path, -1, object_name);
|
||||
|
||||
va_start (ap, first_class);
|
||||
for (name = first_class; name; name = va_arg (ap, const char *))
|
||||
gtk_widget_path_iter_add_class (path, -1, name);
|
||||
@@ -991,7 +1033,6 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (META_TYPE_FRAMES,
|
||||
NULL,
|
||||
provider,
|
||||
"decoration",
|
||||
GTK_STYLE_CLASS_BACKGROUND,
|
||||
"window-frame",
|
||||
"ssd",
|
||||
@@ -1000,7 +1041,6 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (GTK_TYPE_HEADER_BAR,
|
||||
style_info->styles[META_STYLE_ELEMENT_FRAME],
|
||||
provider,
|
||||
NULL,
|
||||
GTK_STYLE_CLASS_TITLEBAR,
|
||||
GTK_STYLE_CLASS_HORIZONTAL,
|
||||
"default-decoration",
|
||||
@@ -1010,14 +1050,12 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (GTK_TYPE_LABEL,
|
||||
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
|
||||
provider,
|
||||
NULL,
|
||||
GTK_STYLE_CLASS_TITLE,
|
||||
NULL);
|
||||
style_info->styles[META_STYLE_ELEMENT_BUTTON] =
|
||||
create_style_context (GTK_TYPE_BUTTON,
|
||||
style_info->styles[META_STYLE_ELEMENT_TITLEBAR],
|
||||
provider,
|
||||
NULL,
|
||||
GTK_STYLE_CLASS_BUTTON,
|
||||
"titlebutton",
|
||||
NULL);
|
||||
@@ -1025,7 +1063,6 @@ meta_theme_create_style_info (GdkScreen *screen,
|
||||
create_style_context (GTK_TYPE_IMAGE,
|
||||
style_info->styles[META_STYLE_ELEMENT_BUTTON],
|
||||
provider,
|
||||
NULL,
|
||||
NULL);
|
||||
return style_info;
|
||||
}
|
||||
|
@@ -251,12 +251,11 @@ notify_key (MetaWaylandKeyboard *keyboard,
|
||||
{
|
||||
struct wl_client *client = wl_resource_get_client (keyboard->focus_surface->resource);
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
|
||||
keyboard->key_serial = wl_display_next_serial (display);
|
||||
uint32_t serial = wl_display_next_serial (display);
|
||||
|
||||
wl_resource_for_each (resource, l)
|
||||
{
|
||||
wl_keyboard_send_key (resource, keyboard->key_serial, time, key, state);
|
||||
wl_keyboard_send_key (resource, serial, time, key, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,10 +672,3 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr));
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
|
||||
uint32_t serial)
|
||||
{
|
||||
return keyboard->key_serial == serial;
|
||||
}
|
||||
|
@@ -68,7 +68,6 @@ struct _MetaWaylandKeyboard
|
||||
MetaWaylandSurface *focus_surface;
|
||||
struct wl_listener focus_surface_listener;
|
||||
uint32_t focus_serial;
|
||||
uint32_t key_serial;
|
||||
|
||||
MetaWaylandXkbInfo xkb_info;
|
||||
enum xkb_state_component mods_changed;
|
||||
@@ -101,7 +100,4 @@ void meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_resource *seat_resource,
|
||||
uint32_t id);
|
||||
|
||||
gboolean meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_KEYBOARD_H */
|
||||
|
@@ -405,12 +405,3 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
|
||||
return sequence || can_grab_surface;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
|
||||
uint32_t serial)
|
||||
{
|
||||
return (meta_wayland_pointer_can_popup (&seat->pointer, serial) ||
|
||||
meta_wayland_keyboard_can_popup (&seat->keyboard, serial) ||
|
||||
meta_wayland_touch_can_popup (&seat->touch, serial));
|
||||
}
|
||||
|
@@ -64,7 +64,5 @@ gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
|
||||
uint32_t serial,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_SEAT_H */
|
||||
|
@@ -933,26 +933,22 @@ set_surface_is_on_output (MetaWaylandSurface *surface,
|
||||
MetaWaylandOutput *wayland_output,
|
||||
gboolean is_on_output)
|
||||
{
|
||||
gpointer orig_id;
|
||||
gboolean was_on_output = g_hash_table_lookup_extended (surface->outputs_to_destroy_notify_id,
|
||||
wayland_output,
|
||||
NULL, &orig_id);
|
||||
gboolean was_on_output = g_hash_table_contains (surface->outputs,
|
||||
wayland_output);
|
||||
|
||||
if (!was_on_output && is_on_output)
|
||||
{
|
||||
gulong id;
|
||||
|
||||
id = g_signal_connect (wayland_output, "output-destroyed",
|
||||
G_CALLBACK (surface_handle_output_destroy),
|
||||
surface);
|
||||
g_hash_table_insert (surface->outputs_to_destroy_notify_id, wayland_output,
|
||||
GSIZE_TO_POINTER ((gsize)id));
|
||||
g_signal_connect (wayland_output, "output-destroyed",
|
||||
G_CALLBACK (surface_handle_output_destroy),
|
||||
surface);
|
||||
g_hash_table_add (surface->outputs, wayland_output);
|
||||
surface_entered_output (surface, wayland_output);
|
||||
}
|
||||
else if (was_on_output && !is_on_output)
|
||||
{
|
||||
g_hash_table_remove (surface->outputs_to_destroy_notify_id, wayland_output);
|
||||
g_signal_handler_disconnect (wayland_output, (gulong) GPOINTER_TO_SIZE (orig_id));
|
||||
g_hash_table_remove (surface->outputs, wayland_output);
|
||||
g_signal_handlers_disconnect_by_func (
|
||||
wayland_output, (gpointer)surface_handle_output_destroy, surface);
|
||||
surface_left_output (surface, wayland_output);
|
||||
}
|
||||
}
|
||||
@@ -990,12 +986,6 @@ update_surface_output_state (gpointer key, gpointer value, gpointer user_data)
|
||||
set_surface_is_on_output (surface, wayland_output, is_on_output);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_output_disconnect_signal (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
g_signal_handler_disconnect (key, (gulong) GPOINTER_TO_SIZE (value));
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
|
||||
{
|
||||
@@ -1046,8 +1036,7 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
|
||||
meta_wayland_compositor_destroy_frame_callbacks (compositor, surface);
|
||||
|
||||
g_hash_table_foreach (surface->outputs_to_destroy_notify_id, surface_output_disconnect_signal, surface);
|
||||
g_hash_table_unref (surface->outputs_to_destroy_notify_id);
|
||||
g_hash_table_unref (surface->outputs);
|
||||
|
||||
wl_list_for_each_safe (cb, next, &surface->pending_frame_callback_list, link)
|
||||
wl_resource_destroy (cb->resource);
|
||||
@@ -1092,7 +1081,7 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
|
||||
sync_drag_dest_funcs (surface);
|
||||
|
||||
surface->outputs_to_destroy_notify_id = g_hash_table_new (NULL, NULL);
|
||||
surface->outputs = g_hash_table_new (NULL, NULL);
|
||||
|
||||
pending_state_init (&surface->pending);
|
||||
return surface;
|
||||
@@ -1526,15 +1515,15 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
||||
surface,
|
||||
xdg_popup_destructor);
|
||||
|
||||
surface->xdg_popup = popup_resource;
|
||||
surface->xdg_shell_resource = resource;
|
||||
|
||||
if (!meta_wayland_seat_can_popup (seat, serial))
|
||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||
{
|
||||
xdg_popup_send_popup_done (popup_resource);
|
||||
return;
|
||||
}
|
||||
|
||||
surface->xdg_popup = popup_resource;
|
||||
surface->xdg_shell_resource = resource;
|
||||
|
||||
surface->popup.parent = parent_surf;
|
||||
surface->popup.parent_destroy_listener.notify = handle_popup_parent_destroyed;
|
||||
wl_resource_add_destroy_listener (parent_surf->resource,
|
||||
@@ -1750,7 +1739,7 @@ wl_shell_surface_set_popup (struct wl_client *client,
|
||||
|
||||
wl_shell_surface_set_state (surface, SURFACE_STATE_TOPLEVEL);
|
||||
|
||||
if (!meta_wayland_seat_can_popup (seat, serial))
|
||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||
{
|
||||
wl_shell_surface_send_popup_done (resource);
|
||||
return;
|
||||
|
@@ -147,7 +147,7 @@ struct _MetaWaylandSurface
|
||||
int scale;
|
||||
int32_t offset_x, offset_y;
|
||||
GList *subsurfaces;
|
||||
GHashTable *outputs_to_destroy_notify_id;
|
||||
GHashTable *outputs;
|
||||
|
||||
/* List of pending frame callbacks that needs to stay queued longer than one
|
||||
* commit sequence, such as when it has not yet been assigned a role.
|
||||
|
@@ -575,26 +575,6 @@ meta_wayland_touch_create_new_resource (MetaWaylandTouch *touch,
|
||||
wl_list_insert (&touch->resource_list, wl_resource_get_link (cr));
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||
uint32_t serial)
|
||||
{
|
||||
MetaWaylandTouchInfo *touch_info;
|
||||
GHashTableIter iter;
|
||||
|
||||
if (!touch->touches)
|
||||
return FALSE;
|
||||
|
||||
g_hash_table_iter_init (&iter, touch->touches);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer*) &touch_info))
|
||||
{
|
||||
if (touch_info->slot_serial == serial)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ClutterEventSequence *
|
||||
meta_wayland_touch_find_grab_sequence (MetaWaylandTouch *touch,
|
||||
MetaWaylandSurface *surface,
|
||||
|
@@ -70,7 +70,4 @@ gboolean meta_wayland_touch_get_press_coords (MetaWaylandTouch *touch,
|
||||
gfloat *x,
|
||||
gfloat *y);
|
||||
|
||||
gboolean meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||
uint32_t serial);
|
||||
|
||||
#endif /* META_WAYLAND_TOUCH_H */
|
||||
|
@@ -691,8 +691,7 @@ meta_spew_event_print (MetaDisplay *display,
|
||||
static gboolean
|
||||
handle_window_focus_event (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XIEnterEvent *event,
|
||||
unsigned long serial)
|
||||
XIEnterEvent *event)
|
||||
{
|
||||
MetaWindow *focus_window;
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
@@ -727,7 +726,7 @@ handle_window_focus_event (MetaDisplay *display,
|
||||
event->event, window_type,
|
||||
meta_event_mode_to_string (event->mode),
|
||||
meta_event_detail_to_string (event->mode),
|
||||
serial);
|
||||
event->serial);
|
||||
#endif
|
||||
|
||||
/* FIXME our pointer tracking is broken; see how
|
||||
@@ -771,7 +770,7 @@ handle_window_focus_event (MetaDisplay *display,
|
||||
if (event->evtype == XI_FocusIn)
|
||||
{
|
||||
display->server_focus_window = event->event;
|
||||
display->server_focus_serial = serial;
|
||||
display->server_focus_serial = event->serial;
|
||||
focus_window = window;
|
||||
}
|
||||
else if (event->evtype == XI_FocusOut)
|
||||
@@ -785,7 +784,7 @@ handle_window_focus_event (MetaDisplay *display,
|
||||
}
|
||||
|
||||
display->server_focus_window = None;
|
||||
display->server_focus_serial = serial;
|
||||
display->server_focus_serial = event->serial;
|
||||
focus_window = NULL;
|
||||
}
|
||||
else
|
||||
@@ -830,9 +829,8 @@ crossing_serial_is_ignored (MetaDisplay *display,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_input_xevent (MetaDisplay *display,
|
||||
XIEvent *input_event,
|
||||
unsigned long serial)
|
||||
handle_input_xevent (MetaDisplay *display,
|
||||
XIEvent *input_event)
|
||||
{
|
||||
XIEnterEvent *enter_event = (XIEnterEvent *) input_event;
|
||||
Window modified;
|
||||
@@ -869,7 +867,7 @@ handle_input_xevent (MetaDisplay *display,
|
||||
/* Check if we've entered a window; do this even if window->has_focus to
|
||||
* avoid races.
|
||||
*/
|
||||
if (window && !crossing_serial_is_ignored (display, serial) &&
|
||||
if (window && !crossing_serial_is_ignored (display, input_event->serial) &&
|
||||
enter_event->mode != XINotifyGrab &&
|
||||
enter_event->mode != XINotifyUngrab &&
|
||||
enter_event->detail != XINotifyInferior &&
|
||||
@@ -894,7 +892,7 @@ handle_input_xevent (MetaDisplay *display,
|
||||
break;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
if (handle_window_focus_event (display, window, enter_event, serial) &&
|
||||
if (handle_window_focus_event (display, window, enter_event) &&
|
||||
enter_event->event == enter_event->root)
|
||||
{
|
||||
if (enter_event->evtype == XI_FocusIn &&
|
||||
@@ -1738,7 +1736,7 @@ meta_display_handle_xevent (MetaDisplay *display,
|
||||
}
|
||||
#endif /* HAVE_XI23 */
|
||||
|
||||
if (handle_input_xevent (display, input_event, event->xany.serial))
|
||||
if (handle_input_xevent (display, input_event))
|
||||
{
|
||||
bypass_gtk = bypass_compositor = TRUE;
|
||||
goto out;
|
||||
|
@@ -182,8 +182,6 @@ argbdata_to_surface (gulong *argb_data, int w, int h)
|
||||
}
|
||||
}
|
||||
|
||||
cairo_surface_mark_dirty (surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
|
@@ -946,15 +946,7 @@ save_state (void)
|
||||
|
||||
/* Sticky */
|
||||
if (window->on_all_workspaces_requested)
|
||||
{
|
||||
fputs (" <sticky/>\n", outfile);
|
||||
} else {
|
||||
int n;
|
||||
n = meta_workspace_index (window->workspace);
|
||||
fprintf (outfile,
|
||||
" <workspace index=\"%d\"/>\n", n);
|
||||
}
|
||||
|
||||
fputs (" <sticky/>\n", outfile);
|
||||
|
||||
/* Minimized */
|
||||
if (window->minimized)
|
||||
@@ -971,6 +963,14 @@ save_state (void)
|
||||
window->saved_rect.height);
|
||||
}
|
||||
|
||||
/* Workspaces we're on */
|
||||
{
|
||||
int n;
|
||||
n = meta_workspace_index (window->workspace);
|
||||
fprintf (outfile,
|
||||
" <workspace index=\"%d\"/>\n", n);
|
||||
}
|
||||
|
||||
/* Gravity */
|
||||
{
|
||||
int x, y, w, h;
|
||||
|
@@ -863,7 +863,7 @@ meta_window_x11_grab_op_began (MetaWindow *window,
|
||||
if (window->sync_request_counter != None)
|
||||
meta_window_x11_create_sync_request_alarm (window);
|
||||
|
||||
if (window->size_hints.width_inc > 2 || window->size_hints.height_inc > 2)
|
||||
if (window->size_hints.width_inc > 1 || window->size_hints.height_inc > 1)
|
||||
{
|
||||
priv->showing_resize_popup = TRUE;
|
||||
meta_window_refresh_resize_popup (window);
|
||||
@@ -2000,12 +2000,16 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
if (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION))
|
||||
{
|
||||
MetaRectangle rect, monitor_rect;
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
gboolean legacy_fullscreen;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
@@ -2015,12 +2019,14 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
* if there are no struts making the workarea smaller than
|
||||
* the monitor.
|
||||
*/
|
||||
if (meta_prefs_get_force_fullscreen() &&
|
||||
!window->hide_titlebar_when_maximized &&
|
||||
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
||||
meta_rectangle_equal (&rect, &monitor_rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
legacy_fullscreen = (meta_prefs_get_force_fullscreen() &&
|
||||
!window->hide_titlebar_when_maximized &&
|
||||
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
||||
meta_rectangle_equal (&rect, &monitor_rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen);
|
||||
|
||||
if (legacy_fullscreen)
|
||||
{
|
||||
/*
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
@@ -2030,11 +2036,17 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
"fullscreen request\n",
|
||||
window->desc);
|
||||
meta_window_make_fullscreen_internal (window);
|
||||
flags |= META_MOVE_RESIZE_DONT_SYNC_COMPOSITOR;
|
||||
}
|
||||
|
||||
adjust_for_gravity (window, TRUE, gravity, &rect);
|
||||
meta_window_client_rect_to_frame_rect (window, &rect, &rect);
|
||||
meta_window_move_resize_internal (window, flags, gravity, rect);
|
||||
|
||||
if (legacy_fullscreen)
|
||||
meta_compositor_size_change_window (window->display->compositor,
|
||||
window, META_SIZE_CHANGE_FULLSCREEN,
|
||||
&old_frame_rect, &old_buffer_rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user