1
#include "gtk-window-decorator.h"
4
rounded_rectangle (cairo_t *cr,
12
if (corner & CORNER_TOPLEFT)
13
cairo_move_to (cr, x + radius, y);
15
cairo_move_to (cr, x, y);
17
if (corner & CORNER_TOPRIGHT)
18
cairo_arc (cr, x + w - radius, y + radius, radius,
19
M_PI * 1.5, M_PI * 2.0);
21
cairo_line_to (cr, x + w, y);
23
if (corner & CORNER_BOTTOMRIGHT)
24
cairo_arc (cr, x + w - radius, y + h - radius, radius,
27
cairo_line_to (cr, x + w, y + h);
29
if (corner & CORNER_BOTTOMLEFT)
30
cairo_arc (cr, x + radius, y + h - radius, radius,
33
cairo_line_to (cr, x, y + h);
35
if (corner & CORNER_TOPLEFT)
36
cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5);
38
cairo_line_to (cr, x, y);
42
fill_rounded_rectangle (cairo_t *cr,
55
cairo_pattern_t *pattern;
57
rounded_rectangle (cr, x, y, w, h, radius, corner);
59
if (gravity & SHADE_RIGHT)
64
else if (!(gravity & SHADE_LEFT))
69
if (gravity & SHADE_BOTTOM)
74
else if (!(gravity & SHADE_TOP))
81
cairo_matrix_t matrix;
83
pattern = cairo_pattern_create_radial (0.0, 0.0, 0.0, 0.0, 0.0, w);
85
cairo_matrix_init_scale (&matrix, 1.0, w / h);
86
cairo_matrix_translate (&matrix, -(x + w), -(y + h));
88
cairo_pattern_set_matrix (pattern, &matrix);
92
pattern = cairo_pattern_create_linear (x + w, y + h, x, y);
95
cairo_pattern_add_color_stop_rgba (pattern, 0.0, c0->r, c0->g, c0->b,
98
cairo_pattern_add_color_stop_rgba (pattern, 1.0, c1->r, c1->g, c1->b,
101
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
103
cairo_set_source (cr, pattern);
105
cairo_pattern_destroy (pattern);
109
draw_shadow_background (decor_t *d,
114
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
116
if (!s || !s->picture ||!d->picture)
118
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
123
decor_fill_picture_extents_with_shadow (xdisplay,
131
draw_close_button (decor_t *d,
135
cairo_rel_move_to (cr, 0.0, s);
137
cairo_rel_line_to (cr, s, -s);
138
cairo_rel_line_to (cr, s, s);
139
cairo_rel_line_to (cr, s, -s);
140
cairo_rel_line_to (cr, s, s);
142
cairo_rel_line_to (cr, -s, s);
143
cairo_rel_line_to (cr, s, s);
144
cairo_rel_line_to (cr, -s, s);
145
cairo_rel_line_to (cr, -s, -s);
147
cairo_rel_line_to (cr, -s, s);
148
cairo_rel_line_to (cr, -s, -s);
149
cairo_rel_line_to (cr, s, -s);
151
cairo_close_path (cr);
155
draw_max_button (decor_t *d,
159
cairo_rel_line_to (cr, 12.0, 0.0);
160
cairo_rel_line_to (cr, 0.0, 12.0);
161
cairo_rel_line_to (cr, -12.0, 0.0);
163
cairo_close_path (cr);
165
cairo_rel_move_to (cr, 2.0, s);
167
cairo_rel_line_to (cr, 12.0 - 4.0, 0.0);
168
cairo_rel_line_to (cr, 0.0, 12.0 - s - 2.0);
169
cairo_rel_line_to (cr, -(12.0 - 4.0), 0.0);
171
cairo_close_path (cr);
175
draw_unmax_button (decor_t *d,
179
cairo_rel_move_to (cr, 1.0, 1.0);
181
cairo_rel_line_to (cr, 10.0, 0.0);
182
cairo_rel_line_to (cr, 0.0, 10.0);
183
cairo_rel_line_to (cr, -10.0, 0.0);
185
cairo_close_path (cr);
187
cairo_rel_move_to (cr, 2.0, s);
189
cairo_rel_line_to (cr, 10.0 - 4.0, 0.0);
190
cairo_rel_line_to (cr, 0.0, 10.0 - s - 2.0);
191
cairo_rel_line_to (cr, -(10.0 - 4.0), 0.0);
193
cairo_close_path (cr);
197
draw_min_button (decor_t *d,
201
cairo_rel_move_to (cr, 0.0, 8.0);
203
cairo_rel_line_to (cr, 12.0, 0.0);
204
cairo_rel_line_to (cr, 0.0, s);
205
cairo_rel_line_to (cr, -12.0, 0.0);
207
cairo_close_path (cr);
210
typedef void (*draw_proc) (cairo_t *cr);
213
button_state_offsets (gdouble x,
219
static double off[] = { 0.0, 0.0, 0.0, 0.5 };
221
*return_x = x + off[state];
222
*return_y = y + off[state];
226
button_state_paint (cairo_t *cr,
228
decor_color_t *color,
232
#define IN_STATE (PRESSED_EVENT_WINDOW | IN_EVENT_WINDOW)
234
if ((state & IN_STATE) == IN_STATE)
236
if (state & IN_EVENT_WINDOW)
237
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
239
cairo_set_source_rgba (cr, color->r, color->g, color->b, 0.95);
241
cairo_fill_preserve (cr);
243
gdk_cairo_set_source_color_alpha (cr,
244
&style->fg[GTK_STATE_NORMAL],
247
cairo_set_line_width (cr, 1.0);
249
cairo_set_line_width (cr, 2.0);
253
gdk_cairo_set_source_color_alpha (cr,
254
&style->fg[GTK_STATE_NORMAL],
256
cairo_stroke_preserve (cr);
258
if (state & IN_EVENT_WINDOW)
259
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
261
cairo_set_source_rgba (cr, color->r, color->g, color->b, 0.95);
268
draw_window_decoration (decor_t *d)
272
GdkDrawable *drawable;
275
double x1, y1, x2, y2, x, y, h;
276
int corners = SHADE_LEFT | SHADE_RIGHT | SHADE_TOP | SHADE_BOTTOM;
283
style = gtk_widget_get_style (style_window_rgba);
285
if (d->state & (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY |
286
WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
289
color.r = style->bg[GTK_STATE_NORMAL].red / 65535.0;
290
color.g = style->bg[GTK_STATE_NORMAL].green / 65535.0;
291
color.b = style->bg[GTK_STATE_NORMAL].blue / 65535.0;
297
cmap = get_colormap_for_drawable (GDK_DRAWABLE (d->pixmap));
298
gdk_drawable_set_colormap (GDK_DRAWABLE (d->pixmap), cmap);
299
gdk_drawable_set_colormap (GDK_DRAWABLE (d->buffer_pixmap), cmap);
300
drawable = GDK_DRAWABLE (d->buffer_pixmap);
302
else if (d->buffer_pixmap)
303
drawable = GDK_DRAWABLE (d->buffer_pixmap);
305
drawable = GDK_DRAWABLE (d->pixmap);
307
cr = gdk_cairo_create (GDK_DRAWABLE (drawable));
311
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
313
top = _win_extents.top + titlebar_height;
315
x1 = d->context->left_space - _win_extents.left;
316
y1 = d->context->top_space - _win_extents.top - titlebar_height;
317
x2 = d->width - d->context->right_space + _win_extents.right;
318
y2 = d->height - d->context->bottom_space + _win_extents.bottom;
320
h = d->height - d->context->top_space - d->context->bottom_space;
322
cairo_set_line_width (cr, 1.0);
324
if (!d->frame_window)
325
draw_shadow_background (d, cr, d->shadow, d->context);
329
decor_color_t *title_color = _title_color;
331
alpha = decoration_alpha + 0.3;
333
fill_rounded_rectangle (cr,
336
_win_extents.left - 0.5,
338
5.0, CORNER_TOPLEFT & corners,
339
&title_color[0], 1.0, &title_color[1], alpha,
340
SHADE_TOP | SHADE_LEFT);
342
fill_rounded_rectangle (cr,
343
x1 + _win_extents.left,
345
x2 - x1 - _win_extents.left -
349
&title_color[0], 1.0, &title_color[1], alpha,
352
fill_rounded_rectangle (cr,
353
x2 - _win_extents.right,
355
_win_extents.right - 0.5,
357
5.0, CORNER_TOPRIGHT & corners,
358
&title_color[0], 1.0, &title_color[1], alpha,
359
SHADE_TOP | SHADE_RIGHT);
363
alpha = decoration_alpha;
365
fill_rounded_rectangle (cr,
368
_win_extents.left - 0.5,
370
5.0, CORNER_TOPLEFT & corners,
371
&color, 1.0, &color, alpha,
372
SHADE_TOP | SHADE_LEFT);
374
fill_rounded_rectangle (cr,
375
x1 + _win_extents.left,
377
x2 - x1 - _win_extents.left -
381
&color, 1.0, &color, alpha,
384
fill_rounded_rectangle (cr,
385
x2 - _win_extents.right,
387
_win_extents.right - 0.5,
389
5.0, CORNER_TOPRIGHT & corners,
390
&color, 1.0, &color, alpha,
391
SHADE_TOP | SHADE_RIGHT);
394
fill_rounded_rectangle (cr,
397
_win_extents.left - 0.5,
400
&color, 1.0, &color, alpha,
403
fill_rounded_rectangle (cr,
404
x2 - _win_extents.right,
406
_win_extents.right - 0.5,
409
&color, 1.0, &color, alpha,
413
fill_rounded_rectangle (cr,
415
y2 - _win_extents.bottom,
416
_win_extents.left - 0.5,
417
_win_extents.bottom - 0.5,
418
5.0, CORNER_BOTTOMLEFT & corners,
419
&color, 1.0, &color, alpha,
420
SHADE_BOTTOM | SHADE_LEFT);
422
fill_rounded_rectangle (cr,
423
x1 + _win_extents.left,
424
y2 - _win_extents.bottom,
425
x2 - x1 - _win_extents.left -
427
_win_extents.bottom - 0.5,
429
&color, 1.0, &color, alpha,
432
fill_rounded_rectangle (cr,
433
x2 - _win_extents.right,
434
y2 - _win_extents.bottom,
435
_win_extents.right - 0.5,
436
_win_extents.bottom - 0.5,
437
5.0, CORNER_BOTTOMRIGHT & corners,
438
&color, 1.0, &color, alpha,
439
SHADE_BOTTOM | SHADE_RIGHT);
442
d->context->left_space,
443
d->context->top_space,
444
d->width - d->context->left_space -
445
d->context->right_space,
447
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
450
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
454
gdk_cairo_set_source_color_alpha (cr,
455
&style->fg[GTK_STATE_NORMAL],
458
cairo_move_to (cr, x1 + 0.5, y1 + top - 0.5);
459
cairo_rel_line_to (cr, x2 - x1 - 1.0, 0.0);
464
rounded_rectangle (cr,
466
x2 - x1 - 1.0, y2 - y1 - 1.0,
468
(CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT |
469
CORNER_BOTTOMRIGHT) & corners);
473
cairo_translate (cr, 1.0, 1.0);
475
rounded_rectangle (cr,
477
x2 - x1 - 1.0, y2 - y1 - 1.0,
479
(CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT |
480
CORNER_BOTTOMRIGHT) & corners);
482
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.4);
486
cairo_translate (cr, -2.0, -2.0);
488
rounded_rectangle (cr,
490
x2 - x1 - 1.0, y2 - y1 - 1.0,
492
(CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT |
493
CORNER_BOTTOMRIGHT) & corners);
495
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.1);
499
cairo_translate (cr, 1.0, 1.0);
501
cairo_reset_clip (cr);
503
rounded_rectangle (cr,
505
x2 - x1 - 1.0, y2 - y1 - 1.0,
507
(CORNER_TOPLEFT | CORNER_TOPRIGHT | CORNER_BOTTOMLEFT |
508
CORNER_BOTTOMRIGHT) & corners);
510
gdk_cairo_set_source_color_alpha (cr,
511
&style->fg[GTK_STATE_NORMAL],
516
cairo_set_line_width (cr, 2.0);
518
button_x = d->width - d->context->right_space - 13;
520
if (d->actions & WNCK_WINDOW_ACTION_CLOSE)
522
button_state_offsets (button_x,
523
y1 - 3.0 + titlebar_height / 2,
524
d->button_states[BUTTON_CLOSE], &x, &y);
530
cairo_move_to (cr, x, y);
531
draw_close_button (d, cr, 3.0);
532
button_state_paint (cr, style, &color,
533
d->button_states[BUTTON_CLOSE]);
537
gdk_cairo_set_source_color_alpha (cr,
538
&style->fg[GTK_STATE_NORMAL],
541
cairo_move_to (cr, x, y);
542
draw_close_button (d, cr, 3.0);
547
if (d->actions & WNCK_WINDOW_ACTION_MAXIMIZE)
549
button_state_offsets (button_x,
550
y1 - 3.0 + titlebar_height / 2,
551
d->button_states[BUTTON_MAX], &x, &y);
555
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
559
gdk_cairo_set_source_color_alpha (cr,
560
&style->fg[GTK_STATE_NORMAL],
563
cairo_move_to (cr, x, y);
565
if (d->state & (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY |
566
WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
567
draw_unmax_button (d, cr, 4.0);
569
draw_max_button (d, cr, 4.0);
571
button_state_paint (cr, style, &color,
572
d->button_states[BUTTON_MAX]);
576
gdk_cairo_set_source_color_alpha (cr,
577
&style->fg[GTK_STATE_NORMAL],
580
cairo_move_to (cr, x, y);
582
if (d->state & (WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY |
583
WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
584
draw_unmax_button (d, cr, 4.0);
586
draw_max_button (d, cr, 4.0);
592
if (d->actions & WNCK_WINDOW_ACTION_MINIMIZE)
594
button_state_offsets (button_x,
595
y1 - 3.0 + titlebar_height / 2,
596
d->button_states[BUTTON_MIN], &x, &y);
602
gdk_cairo_set_source_color_alpha (cr,
603
&style->fg[GTK_STATE_NORMAL],
607
cairo_move_to (cr, x, y);
608
draw_min_button (d, cr, 4.0);
609
button_state_paint (cr, style, &color,
610
d->button_states[BUTTON_MIN]);
614
gdk_cairo_set_source_color_alpha (cr,
615
&style->fg[GTK_STATE_NORMAL],
618
cairo_move_to (cr, x, y);
619
draw_min_button (d, cr, 4.0);
629
d->context->left_space + 21.0,
630
y1 + 2.0 + (titlebar_height - text_height) / 2.0);
632
gdk_cairo_set_source_color_alpha (cr,
633
&style->fg[GTK_STATE_NORMAL],
636
pango_cairo_layout_path (cr, d->layout);
639
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
643
gdk_cairo_set_source_color_alpha (cr,
644
&style->fg[GTK_STATE_NORMAL],
649
d->context->left_space + 21.0,
650
y1 + 2.0 + (titlebar_height - text_height) / 2.0);
652
pango_cairo_show_layout (cr, d->layout);
657
cairo_translate (cr, d->context->left_space + 1,
658
y1 - 5.0 + titlebar_height / 2);
659
cairo_set_source (cr, d->icon);
660
cairo_rectangle (cr, 0.0, 0.0, 16.0, 16.0);
666
cairo_paint_with_alpha (cr, alpha);
671
copy_to_front_buffer (d);
675
GdkWindow *gdk_frame_window = gtk_widget_get_window (d->decor_window);
677
gtk_image_set_from_pixmap (GTK_IMAGE (d->decor_image), d->pixmap, NULL);
678
gtk_window_resize (GTK_WINDOW (d->decor_window), d->width, d->height);
679
gdk_window_move (gdk_frame_window, 0, 0);
680
gdk_window_lower (gdk_frame_window);
685
decor_update_window_property (d);
691
calc_button_size (decor_t *d)
697
if (d->actions & WNCK_WINDOW_ACTION_CLOSE)
700
if (d->actions & (WNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY |
701
WNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY |
702
WNCK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY |
703
WNCK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY))
706
if (d->actions & (WNCK_WINDOW_ACTION_MINIMIZE |
707
WNCK_WINDOW_ACTION_MINIMIZE))
713
d->button_width = button_width;
717
calc_decoration_size (decor_t *d,
724
decor_layout_t layout;
727
/* To avoid wasting texture memory, we only calculate the minimal
728
* required decoration size then clip and stretch the texture where
732
if (!d->frame_window)
734
calc_button_size (d);
736
if (w < ICON_SPACE + d->button_width)
739
top_width = name_width + d->button_width + ICON_SPACE;
741
top_width = MAX (ICON_SPACE + d->button_width, w);
744
decor_get_default_layout (&window_active_context, top_width, 1, &layout);
746
decor_get_default_layout (&window_inactive_context, top_width, 1, &layout);
748
if (!d->context || memcmp (&layout, &d->border_layout, sizeof (layout)))
750
*width = layout.width;
751
*height = layout.height;
753
d->border_layout = layout;
756
d->context = &window_active_context;
757
d->shadow = border_active_shadow;
761
d->context = &window_inactive_context;
762
d->shadow = border_inactive_shadow;
770
calc_button_size (d);
772
/* _default_win_extents + top height */
774
top_width = name_width + d->button_width + ICON_SPACE;
776
top_width = MAX (ICON_SPACE + d->button_width, w);
778
decor_get_default_layout (&window_context_no_shadow,
779
d->client_width, d->client_height, &layout);
781
*width = layout.width;
782
*height = layout.height;
784
d->border_layout = layout;
785
d->context = &window_context_no_shadow;
786
d->shadow = border_no_shadow;
795
get_button_position (decor_t *d,
809
*x = bpos[i].x + bpos[i].xw * width + _win_extents.left + 4;
810
*y = bpos[i].y + bpos[i].yh * height + bpos[i].yth *
811
(titlebar_height - 17) + _win_extents.top + 2;
815
*x = bpos[i].x + bpos[i].xw * width;
816
*y = bpos[i].y + bpos[i].yh * height + bpos[i].yth *
817
(titlebar_height - 17);
820
*w = bpos[i].w + bpos[i].ww * width;
821
*h = bpos[i].h + bpos[i].hh * height + bpos[i].hth +
822
(titlebar_height - 17);
824
/* hack to position multiple buttons on the right */
825
if (i != BUTTON_MENU)
832
get_event_window_position (decor_t *d,
844
*x = pos[i][j].x + pos[i][j].xw * width + _win_extents.left;
845
*y = pos[i][j].y + _win_extents.top +
846
pos[i][j].yh * height + pos[i][j].yth * (titlebar_height - 17);
848
if (i == 0 && (j == 0 || j == 2))
849
*y -= titlebar_height;
853
*x = pos[i][j].x + pos[i][j].xw * width;
855
pos[i][j].yh * height + pos[i][j].yth * (titlebar_height - 17);
858
if ((d->state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
865
*w = pos[i][j].w + pos[i][j].ww * width;
868
if ((d->state & WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY) &&
876
pos[i][j].hh * height + pos[i][j].hth * (titlebar_height - 17);
881
update_border_extents (gint text_height)
883
_win_extents = _default_win_extents;
884
_max_win_extents = _default_win_extents;
885
max_titlebar_height = titlebar_height =
886
(text_height < 17) ? 17 : text_height;
890
cairo_update_shadow (gint shadow_type)
892
decor_shadow_options_t opt_active_shadow;
893
decor_shadow_options_t opt_inactive_shadow;
894
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
895
GdkDisplay *display = gdk_display_get_default ();
896
GdkScreen *screen = gdk_display_get_default_screen (display);
898
opt_active_shadow.shadow_radius = shadow_radius;
899
opt_active_shadow.shadow_opacity = shadow_opacity;
901
memcpy (opt_active_shadow.shadow_color, shadow_color, sizeof (shadow_color));
903
opt_active_shadow.shadow_offset_x = shadow_offset_x;
904
opt_active_shadow.shadow_offset_y = shadow_offset_y;
906
opt_inactive_shadow.shadow_radius = shadow_radius;
907
opt_inactive_shadow.shadow_opacity = shadow_opacity;
909
opt_inactive_shadow.shadow_offset_x = shadow_offset_x;
910
opt_inactive_shadow.shadow_offset_y = shadow_offset_y;
912
memcpy (opt_inactive_shadow.shadow_color, shadow_color, sizeof (shadow_color));
916
case SHADOW_TYPE_ACTIVE_NORMAL:
917
return decor_shadow_create (xdisplay,
918
gdk_x11_screen_get_xscreen (screen),
922
_win_extents.top + titlebar_height,
925
TRANSLUCENT_CORNER_SIZE,
927
TRANSLUCENT_CORNER_SIZE,
928
_win_extents.top + titlebar_height -
929
TRANSLUCENT_CORNER_SIZE,
930
_win_extents.bottom -
931
TRANSLUCENT_CORNER_SIZE,
933
&window_active_context,
937
case SHADOW_TYPE_INACTIVE_NORMAL:
938
return decor_shadow_create (xdisplay,
939
gdk_x11_screen_get_xscreen (screen),
943
_win_extents.top + titlebar_height,
946
TRANSLUCENT_CORNER_SIZE,
948
TRANSLUCENT_CORNER_SIZE,
949
_win_extents.top + titlebar_height -
950
TRANSLUCENT_CORNER_SIZE,
951
_win_extents.bottom -
952
TRANSLUCENT_CORNER_SIZE,
953
&opt_inactive_shadow,
954
&window_inactive_context,
957
case SHADOW_TYPE_ACTIVE_MAX:
958
return decor_shadow_create (xdisplay,
959
gdk_x11_screen_get_xscreen (screen),
961
_max_win_extents.left,
962
_max_win_extents.right,
963
_max_win_extents.top + max_titlebar_height,
964
_max_win_extents.bottom,
965
_max_win_extents.left - TRANSLUCENT_CORNER_SIZE,
966
_max_win_extents.right - TRANSLUCENT_CORNER_SIZE,
967
_max_win_extents.top + max_titlebar_height -
968
TRANSLUCENT_CORNER_SIZE,
969
_max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
971
&max_window_active_context,
974
case SHADOW_TYPE_INACTIVE_MAX:
975
return decor_shadow_create (xdisplay,
976
gdk_x11_screen_get_xscreen (screen),
978
_max_win_extents.left,
979
_max_win_extents.right,
980
_max_win_extents.top + max_titlebar_height,
981
_max_win_extents.bottom,
982
_max_win_extents.left - TRANSLUCENT_CORNER_SIZE,
983
_max_win_extents.right - TRANSLUCENT_CORNER_SIZE,
984
_max_win_extents.top + max_titlebar_height -
985
TRANSLUCENT_CORNER_SIZE,
986
_max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
987
&opt_inactive_shadow,
988
&max_window_inactive_context,
999
get_shadow (decor_t *d, gint shadow_type)