mirror of
https://github.com/brl/mutter.git
synced 2025-06-23 13:31:17 +00:00
Stop shaping the frame window
In preparation for switching to handling the output shape purely by what we paint, stop applying a shape to the frame of the window. Even when we restore handling the output shape, this will change the behavior with respect to input; transparent areas between the frame and the contents will stop clicks rather than passing them through, but that is arguably at least as expected considering how that we decorate shaped windows with a frame all around. https://bugzilla.gnome.org/show_bug.cgi?id=644930
This commit is contained in:
@ -1696,13 +1696,6 @@ event_callback (XEvent *event,
|
||||
"Window %s shape changed\n",
|
||||
window->desc);
|
||||
}
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
window->frame->need_reapply_frame_shape = TRUE;
|
||||
meta_warning("from event callback\n");
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4100,8 +4093,6 @@ meta_display_queue_retheme_all_windows (MetaDisplay *display)
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
if (window->frame)
|
||||
{
|
||||
window->frame->need_reapply_frame_shape = TRUE;
|
||||
|
||||
meta_frame_queue_draw (window->frame);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
frame->current_cursor = 0;
|
||||
|
||||
frame->mapped = FALSE;
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
frame->is_flashing = FALSE;
|
||||
|
||||
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
|
||||
@ -167,14 +166,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
/* Move keybindings to frame instead of window */
|
||||
meta_window_grab_keys (window);
|
||||
|
||||
/* Shape mask */
|
||||
meta_ui_apply_frame_shape (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
frame->window->has_shape);
|
||||
frame->need_reapply_frame_shape = FALSE;
|
||||
|
||||
meta_display_ungrab (window->display);
|
||||
}
|
||||
|
||||
@ -329,35 +320,12 @@ meta_frame_calc_geometry (MetaFrame *frame,
|
||||
*geomp = geom;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_shape (MetaFrame *frame)
|
||||
{
|
||||
if (frame->need_reapply_frame_shape)
|
||||
{
|
||||
meta_ui_apply_frame_shape (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
frame->window->has_shape);
|
||||
frame->need_reapply_frame_shape = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_frame_sync_to_window (MetaFrame *frame,
|
||||
int resize_gravity,
|
||||
gboolean need_move,
|
||||
gboolean need_resize)
|
||||
{
|
||||
if (!(need_move || need_resize))
|
||||
{
|
||||
return update_shape (frame);
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Syncing frame geometry %d,%d %dx%d (SE: %d,%d)\n",
|
||||
frame->rect.x, frame->rect.y,
|
||||
@ -372,19 +340,8 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
|
||||
/* we need new shape if we're resized */
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
}
|
||||
|
||||
/* Done before the window resize, because doing it before means
|
||||
* part of the window being resized becomes unshaped, which may
|
||||
* be sort of hard to see with bg = None. If we did it after
|
||||
* window resize, part of the window being resized would become
|
||||
* shaped, which might be more visible.
|
||||
*/
|
||||
update_shape (frame);
|
||||
|
||||
meta_ui_move_resize_frame (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
|
@ -3334,14 +3334,6 @@ meta_window_maximize_internal (MetaWindow *window,
|
||||
if (maximize_horizontally || maximize_vertically)
|
||||
window->force_save_user_rect = FALSE;
|
||||
|
||||
/* Fix for #336850: If the frame shape isn't reapplied, it is
|
||||
* possible that the frame will retains its rounded corners. That
|
||||
* happens if the client's size when maximized equals the unmaximized
|
||||
* size.
|
||||
*/
|
||||
if (window->frame)
|
||||
window->frame->need_reapply_frame_shape = TRUE;
|
||||
|
||||
recalc_window_features (window);
|
||||
set_net_wm_state (window);
|
||||
|
||||
|
Reference in New Issue
Block a user