mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
theme: Add tiled_left/tiled_right frame states
It may be desirable for theme authors to treat side-by-side tiled windows differently, for instance to give the edge-touching border a width of 0, so add additional frame states for tiled windows. https://bugzilla.gnome.org/show_bug.cgi?id=637330
This commit is contained in:
@ -291,6 +291,12 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (META_WINDOW_MAXIMIZED (frame->window))
|
||||
flags |= META_FRAME_MAXIMIZED;
|
||||
|
||||
if (META_WINDOW_TILED_LEFT (frame->window))
|
||||
flags |= META_FRAME_TILED_LEFT;
|
||||
|
||||
if (META_WINDOW_TILED_RIGHT (frame->window))
|
||||
flags |= META_FRAME_TILED_RIGHT;
|
||||
|
||||
if (frame->window->fullscreen)
|
||||
flags |= META_FRAME_FULLSCREEN;
|
||||
|
||||
|
@ -413,6 +413,10 @@ struct _MetaWindowClass
|
||||
#define META_WINDOW_TILED_SIDE_BY_SIDE(w) ((w)->maximized_vertically && \
|
||||
!(w)->maximized_horizontally && \
|
||||
(w)->tile_mode != META_TILE_NONE)
|
||||
#define META_WINDOW_TILED_LEFT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||
(w)->tile_mode == META_TILE_LEFT)
|
||||
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||
(w)->tile_mode == META_TILE_RIGHT)
|
||||
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
||||
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
|
||||
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
||||
|
Reference in New Issue
Block a user