~ubuntu-branches/ubuntu/precise/xfwm4/precise-updates

« back to all changes in this revision

Viewing changes to src/frame.c

  • Committer: Bazaar Package Importer
  • Author(s): Jérôme Guelfucci, Jérôme Guelfucci, Lionel Le Folgoc
  • Date: 2009-01-30 18:28:59 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20090130182859-1tci3n1f1hhppvc2
Tags: 4.5.99.1-0ubuntu1
[ Jérôme Guelfucci ]
* Merge with Debian Xfce UNRELEASED, remaining Ubuntu changes:
  - debian/xfwm4.1: update bug reporting address (LP instead of Debian BTS).

[ Lionel Le Folgoc ]
* debian/control: use our Vcs-* fields.
* Bugs fixed by this new release:
  - "User interface of focused application is covered by another application's
    new window in Xfce" (LP: #250101)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $Id: frame.c 25530 2007-04-11 22:39:59Z olivier $
 
1
/*      $Id$
2
2
 
3
3
        This program is free software; you can redistribute it and/or modify
4
4
        it under the terms of the GNU General Public License as published by
12
12
 
13
13
        You should have received a copy of the GNU General Public License
14
14
        along with this program; if not, write to the Free Software
15
 
        Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
15
        Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston,
 
16
        MA 02110-1301, USA.
 
17
 
16
18
 
17
19
        oroborus - (c) 2001 Ken Lynch
18
 
        xfwm4    - (c) 2002-2006 Olivier Fourdan
 
20
        xfwm4    - (c) 2002-2009 Olivier Fourdan
19
21
 
20
22
 */
21
23
 
22
24
#ifdef HAVE_CONFIG_H
23
 
#include <config.h>
 
25
#include "config.h"
24
26
#endif
25
27
 
26
28
#include <glib.h>
37
39
#include "frame.h"
38
40
#include "compositor.h"
39
41
 
40
 
#ifndef ShapeInput
41
 
#define ShapeInput 2
42
 
#endif
 
42
typedef struct
 
43
{
 
44
    xfwmPixmap pm_title;
 
45
    xfwmPixmap pm_sides[SIDE_COUNT];
 
46
} FramePixmap;
 
47
 
43
48
 
44
49
int
45
50
frameDecorationLeft (ScreenInfo *screen_info)
249
254
}
250
255
 
251
256
static void
252
 
frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * pm)
 
257
frameFillTitlePixmap (Client * c, int state, int part, int x, int w, int h, xfwmPixmap * title_pm, xfwmPixmap * top_pm)
 
258
{
 
259
    ScreenInfo *screen_info;
 
260
 
 
261
    TRACE ("entering frameFillTitlePixmap");
 
262
 
 
263
    g_return_if_fail (c);
 
264
    g_return_if_fail (title_pm);
 
265
    g_return_if_fail (top_pm);
 
266
 
 
267
    screen_info = c->screen_info;
 
268
 
 
269
    if (!xfwmPixmapNone(&screen_info->top[part][state]))
 
270
    {
 
271
        xfwmPixmapFill (&screen_info->top[part][state], top_pm, x, 0, w, h);
 
272
    }
 
273
    else
 
274
    {
 
275
        xfwmPixmapFill (&screen_info->title[part][state], top_pm, x, 0, w, h);
 
276
    }
 
277
    xfwmPixmapFill (&screen_info->title[part][state], title_pm, x, 0, w, frameTop (c));
 
278
}
 
279
 
 
280
static void
 
281
frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * title_pm, xfwmPixmap * top_pm)
253
282
{
254
283
    ScreenInfo *screen_info;
255
284
    DisplayInfo *display_info;
260
289
    PangoRectangle logical_rect;
261
290
    int width, x, hoffset, w1, w2, w3, w4, w5, temp;
262
291
    int voffset, title_x, title_y;
 
292
    int title_height, top_height;
263
293
 
264
294
    TRACE ("entering frameCreateTitlePixmap");
265
295
 
266
296
    g_return_if_fail (c);
267
 
    g_return_if_fail (pm);
 
297
    g_return_if_fail (title_pm);
 
298
    g_return_if_fail (top_pm);
268
299
 
269
300
    screen_info = c->screen_info;
270
301
    display_info = screen_info->display_info;
279
310
    width = frameWidth (c) - frameTopLeftWidth (c, state) - frameTopRightWidth (c, state);
280
311
    if (width < 1)
281
312
    {
282
 
        pm->pixmap = None;
283
 
        pm->mask = None;
284
 
        pm->width = 0;
285
 
        pm->height = 0;
286
313
        return;
287
314
    }
288
315
 
 
316
    layout = gtk_widget_create_pango_layout (myScreenGetGtkWidget (screen_info), c->name);
 
317
    pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 
318
 
289
319
    if (left < frameTopLeftWidth (c, state))
290
320
    {
291
321
        left = frameTopLeftWidth (c, state);
304
334
 
305
335
    x = 0;
306
336
    hoffset = 0;
307
 
    voffset = 0;
 
337
 
 
338
    if (state == ACTIVE)
 
339
    {
 
340
        voffset = screen_info->params->title_vertical_offset_active;
 
341
    }
 
342
    else
 
343
    {
 
344
        voffset = screen_info->params->title_vertical_offset_inactive;
 
345
    }
 
346
 
 
347
    title_height = screen_info->font_height;
 
348
    if (!title_height)
 
349
    {
 
350
        /* If for some reason the font height is not known,
 
351
         * use the actual pango layout height.
 
352
         */
 
353
        title_height = logical_rect.height;
 
354
    }
 
355
    title_y = voffset + (frameTop (c) - title_height) / 2;
 
356
    if (title_y + title_height > frameTop (c))
 
357
    {
 
358
        title_y = MAX (0, frameTop (c) - title_height);
 
359
    }
 
360
 
 
361
    if (!xfwmPixmapNone(&screen_info->top[3][ACTIVE]))
 
362
    {
 
363
        top_height = screen_info->top[3][ACTIVE].height;
 
364
    }
 
365
    else
 
366
    {
 
367
        top_height = frameTop (c) / 10 + 1;
 
368
        if (top_height > title_y - 1)
 
369
        {
 
370
             top_height = MAX (title_y - 1, 0);
 
371
        }
 
372
    }
308
373
 
309
374
    w1 = 0;
310
375
    w2 = screen_info->title[TITLE_2][state].width;
311
376
    w4 = screen_info->title[TITLE_4][state].width;
312
377
 
313
 
    layout = gtk_widget_create_pango_layout (myScreenGetGtkWidget (screen_info), c->name);
314
 
    pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
315
 
 
316
378
    if (screen_info->params->full_width_title)
317
379
    {
318
380
        w1 = left;
341
403
    }
342
404
    else
343
405
    {
344
 
        w3 = logical_rect.width;
 
406
        w3 = logical_rect.width + screen_info->params->title_shadow[state];
345
407
        w5 = width;
346
408
        if (w3 > width - w2 - w4)
347
409
        {
369
431
        }
370
432
    }
371
433
 
372
 
    xfwmPixmapCreate (screen_info, pm, width, frameTop (c));
373
 
    gpixmap = gdk_pixmap_foreign_new (pm->pixmap);
 
434
    xfwmPixmapCreate (screen_info, top_pm, width, top_height);
 
435
    xfwmPixmapCreate (screen_info, title_pm, width, frameTop (c));
 
436
    gpixmap = gdk_pixmap_foreign_new (title_pm->pixmap);
374
437
    gdk_drawable_set_colormap (gpixmap, gdk_screen_get_rgb_colormap (screen_info->gscr));
375
438
    gc = gdk_gc_new (gpixmap);
376
439
 
377
440
    if (w1 > 0)
378
441
    {
379
 
        xfwmPixmapFill (&screen_info->title[TITLE_1][state], pm, 0, 0, w1, frameTop (c));
 
442
        frameFillTitlePixmap (c, state, TITLE_1, x, w1, top_height, title_pm, top_pm);
380
443
        x = x + w1;
381
444
    }
382
445
 
383
 
    xfwmPixmapFill (&screen_info->title[TITLE_2][state], pm, x, 0, w2, frameTop (c));
 
446
    frameFillTitlePixmap (c, state, TITLE_2, x, w2, top_height, title_pm, top_pm);
384
447
    x = x + w2;
385
448
 
386
449
    if (w3 > 0)
387
450
    {
388
 
        if (state == ACTIVE)
389
 
        {
390
 
            voffset = screen_info->params->title_vertical_offset_active;
391
 
        }
392
 
        else
393
 
        {
394
 
            voffset = screen_info->params->title_vertical_offset_inactive;
395
 
        }
396
 
        xfwmPixmapFill (&screen_info->title[TITLE_3][state], pm, x, 0, w3, frameTop (c));
 
451
        frameFillTitlePixmap (c, state, TITLE_3, x, w3, top_height, title_pm, top_pm);
397
452
        title_x = hoffset + x;
398
 
        title_y = voffset + (frameTop (c) - logical_rect.height) / 2;
399
 
        if (title_y + logical_rect.height > frameTop (c))
400
 
        {
401
 
            title_y = MAX (0, frameTop (c) - logical_rect.height);
402
 
        }
403
453
        if (screen_info->params->title_shadow[state])
404
454
        {
405
455
            gdk_gc_get_values (screen_info->title_shadow_colors[state].gc, &values);
426
476
    {
427
477
        x = right - w4;
428
478
    }
429
 
    xfwmPixmapFill (&screen_info->title[TITLE_4][state], pm, x, 0, w4, frameTop (c));
 
479
    frameFillTitlePixmap (c, state, TITLE_4, x, w4, top_height, title_pm, top_pm);
430
480
    x = x + w4;
431
481
 
432
482
    if (w5 > 0)
433
483
    {
434
 
        xfwmPixmapFill (&screen_info->title[TITLE_5][state], pm, x, 0, w5, frameTop (c));
 
484
        frameFillTitlePixmap (c, state, TITLE_5, x, w5, top_height, title_pm, top_pm);
435
485
    }
436
486
    g_object_unref (G_OBJECT (gc));
437
487
    g_object_unref (G_OBJECT (gpixmap));
539
589
    return chr;
540
590
}
541
591
 
542
 
static xfwmPixmap *
543
 
frameGetPixmap (Client * c, int button, int state)
544
 
{
545
 
    ScreenInfo *screen_info;
546
 
 
547
 
    screen_info = c->screen_info;
548
 
    switch (button)
549
 
    {
550
 
        case MENU_BUTTON:
551
 
            if (screen_info->params->show_app_icon)
552
 
            {
553
 
                return &c->appmenu[state];
554
 
            }
555
 
            break;
556
 
        case SHADE_BUTTON:
557
 
            if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED)
558
 
                && screen_info->buttons[SHADE_BUTTON][state + 3].pixmap)
559
 
            {
560
 
                return &screen_info->buttons[SHADE_BUTTON][state + 3];
561
 
            }
562
 
            return &screen_info->buttons[SHADE_BUTTON][state];
563
 
            break;
564
 
        case STICK_BUTTON:
565
 
            if (FLAG_TEST (c->flags, CLIENT_FLAG_STICKY)
566
 
                && screen_info->buttons[STICK_BUTTON][state + 3].pixmap)
567
 
            {
568
 
                return &screen_info->buttons[STICK_BUTTON][state + 3];
569
 
            }
570
 
            return &screen_info->buttons[STICK_BUTTON][state];
571
 
            break;
572
 
        case MAXIMIZE_BUTTON:
573
 
            if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED)
574
 
                && screen_info->buttons[MAXIMIZE_BUTTON][state + 3].pixmap)
575
 
            {
576
 
                return &screen_info->buttons[MAXIMIZE_BUTTON][state + 3];
577
 
            }
578
 
            return &screen_info->buttons[MAXIMIZE_BUTTON][state];
579
 
            break;
580
 
        default:
581
 
            break;
582
 
    }
583
 
    return &screen_info->buttons[button][state];
584
 
}
585
 
 
586
 
 
587
592
static void
588
593
frameSetShape (Client * c, int state, FramePixmap * frame_pix, int button_x[BUTTON_COUNT])
589
594
{
653
658
                               ShapeBounding, 0, 0, frame_pix->pm_sides[SIDE_BOTTOM].mask, ShapeSet);
654
659
        }
655
660
 
 
661
        if (xfwmWindowVisible (&c->sides[SIDE_TOP]))
 
662
        {
 
663
            XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->sides[SIDE_TOP]),
 
664
                               ShapeBounding, 0, 0, frame_pix->pm_sides[SIDE_TOP].mask, ShapeSet);
 
665
        }
 
666
 
656
667
        if (xfwmWindowVisible (&c->corners[CORNER_BOTTOM_LEFT]))
657
668
        {
658
669
            XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_BOTTOM_LEFT]),
677
688
                               ShapeBounding, 0, 0, screen_info->corners[CORNER_TOP_RIGHT][state].mask, ShapeSet);
678
689
        }
679
690
 
680
 
        for (i = 0; i < BUTTON_LAST; i++)
 
691
        for (i = 0; i < BUTTON_COUNT; i++)
681
692
        {
682
693
            if (xfwmWindowVisible (&c->buttons[i]))
683
694
            {
684
 
                my_pixmap = frameGetPixmap (c, i, c->button_pressed[i] ? PRESSED : state);
 
695
                my_pixmap = clientGetButtonPixmap (c, i, clientGetButtonState (c, i, state));
685
696
                XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->buttons[i]),
686
697
                                   ShapeBounding, 0, 0, my_pixmap->mask, ShapeSet);
687
698
            }
772
783
                                MYWINDOW_XWINDOW (c->sides[SIDE_BOTTOM]), ShapeBounding, ShapeUnion);
773
784
        }
774
785
 
 
786
        if (xfwmWindowVisible (&c->sides[SIDE_TOP]))
 
787
        {
 
788
            XShapeCombineShape (display_info->dpy, shape_win, ShapeBounding,
 
789
                                screen_info->corners[CORNER_BOTTOM_LEFT][state].width,
 
790
                                frameTop (c) - frameBottom (c),
 
791
                                MYWINDOW_XWINDOW (c->sides[SIDE_TOP]), ShapeBounding, ShapeUnion);
 
792
        }
 
793
 
775
794
        if (xfwmWindowVisible (&c->corners[CORNER_BOTTOM_LEFT]))
776
795
        {
777
796
            XShapeCombineShape (display_info->dpy, shape_win, ShapeBounding, 0,
794
813
                                0, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_RIGHT]), ShapeBounding, ShapeUnion);
795
814
        }
796
815
 
797
 
        for (i = 0; i < BUTTON_LAST; i++)
 
816
        for (i = 0; i < BUTTON_COUNT; i++)
798
817
        {
799
818
            if (xfwmWindowVisible (&c->buttons[i]))
800
819
            {
821
840
    XDestroyWindow (display_info->dpy, shape_win);
822
841
}
823
842
 
824
 
void
825
 
frameDraw (Client * c, gboolean clear_all)
 
843
static void
 
844
frameDrawWin (Client * c)
826
845
{
827
846
    ScreenInfo *screen_info;
828
847
    FramePixmap frame_pix;
839
858
 
840
859
    g_return_if_fail (c != NULL);
841
860
 
 
861
    frameClearQueueDraw (c);
 
862
 
842
863
    screen_info = c->screen_info;
843
864
    requires_clearing = FALSE;
844
865
    width_changed = FALSE;
882
903
    FLAG_UNSET (c->xfwm_flags,  XFWM_FLAG_FIRST_MAP);
883
904
 
884
905
    /* Cache mgmt */
885
 
    if (clear_all)
 
906
    if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_NEEDS_REDRAW))
886
907
    {
 
908
        FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_NEEDS_REDRAW);
887
909
        width_changed = TRUE;
888
910
        height_changed = TRUE;
889
911
        requires_clearing = TRUE;
890
 
        frameClearQueueDraw (c);
891
 
        if (c->frame_timeout_id)
892
 
        {
893
 
            g_source_remove (c->frame_timeout_id);
894
 
            c->frame_timeout_id = 0;
895
 
        }
896
 
 
897
912
    }
898
913
    else
899
914
    {
913
928
        && !FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
914
929
    {
915
930
        /* First, hide the buttons that we don't have... */
916
 
        for (i = 0; i < BUTTON_LAST; i++)
 
931
        for (i = 0; i < BUTTON_COUNT; i++)
917
932
        {
918
933
            char b = getLetterFromButton (i, c);
919
934
            if ((!b) || !strchr (screen_info->params->button_layout, b))
940
955
            {
941
956
                if (x + screen_info->buttons[button][state].width + screen_info->params->button_spacing < right)
942
957
                {
943
 
                    my_pixmap = frameGetPixmap (c, button, c->button_pressed[button] ? PRESSED : state);
944
 
                    if (my_pixmap->pixmap)
 
958
                    my_pixmap = clientGetButtonPixmap (c, button, clientGetButtonState (c, button, state));
 
959
                    if (!xfwmPixmapNone(my_pixmap))
945
960
                    {
946
961
                        xfwmWindowSetBG (&c->buttons[button], my_pixmap);
947
962
                    }
975
990
            {
976
991
                if (x - screen_info->buttons[button][state].width - screen_info->params->button_spacing > left)
977
992
                {
978
 
                    my_pixmap = frameGetPixmap (c, button, c->button_pressed[button] ? PRESSED : state);
979
 
                    if (my_pixmap->pixmap)
 
993
                    my_pixmap = clientGetButtonPixmap (c, button, clientGetButtonState (c, button, state));
 
994
                    if (!xfwmPixmapNone(my_pixmap))
980
995
                    {
981
996
                        xfwmWindowSetBG (&c->buttons[button], my_pixmap);
982
997
                    }
1007
1022
            screen_info->corners[CORNER_BOTTOM_RIGHT][state].height;
1008
1023
 
1009
1024
        xfwmPixmapInit (screen_info, &frame_pix.pm_title);
 
1025
        xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_TOP]);
 
1026
        xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_BOTTOM]);
1010
1027
        xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_LEFT]);
1011
1028
        xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_RIGHT]);
1012
 
        xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_BOTTOM]);
1013
1029
 
1014
1030
        /* The title is always visible */
1015
 
        frameCreateTitlePixmap (c, state, left, right, &frame_pix.pm_title);
 
1031
        frameCreateTitlePixmap (c, state, left, right, &frame_pix.pm_title, &frame_pix.pm_sides[SIDE_TOP]);
1016
1032
        xfwmWindowSetBG (&c->title, &frame_pix.pm_title);
1017
1033
        xfwmWindowShow (&c->title,
1018
1034
            frameTopLeftWidth (c, state), 0, top_width,
1037
1053
            xfwmWindowHide (&c->sides[SIDE_LEFT]);
1038
1054
            xfwmWindowHide (&c->sides[SIDE_RIGHT]);
1039
1055
            xfwmWindowHide (&c->sides[SIDE_BOTTOM]);
 
1056
            xfwmWindowHide (&c->sides[SIDE_TOP]);
1040
1057
            xfwmWindowHide (&c->corners[CORNER_TOP_LEFT]);
1041
1058
            xfwmWindowHide (&c->corners[CORNER_TOP_RIGHT]);
1042
1059
            xfwmWindowHide (&c->corners[CORNER_BOTTOM_LEFT]);
1085
1102
                frameHeight (c) - frameBottom (c), bottom_width, frameBottom (c),
1086
1103
                (requires_clearing | width_changed));
1087
1104
 
 
1105
            if (!xfwmPixmapNone(&frame_pix.pm_sides[SIDE_TOP]))
 
1106
            {
 
1107
                xfwmWindowSetBG (&c->sides[SIDE_TOP], &frame_pix.pm_sides[SIDE_TOP]);
 
1108
                xfwmWindowShow (&c->sides[SIDE_TOP],
 
1109
                    screen_info->corners[CORNER_TOP_LEFT][state].width,
 
1110
                    0, top_width, frame_pix.pm_sides[SIDE_TOP].height,
 
1111
                    (requires_clearing | width_changed));
 
1112
            }
 
1113
            else
 
1114
            {
 
1115
                xfwmWindowHide (&c->sides[SIDE_TOP]);
 
1116
            }
 
1117
 
1088
1118
            xfwmWindowShow (&c->corners[CORNER_TOP_LEFT], 0, 0,
1089
1119
                frameTopLeftWidth (c, state),
1090
1120
                screen_info->corners[CORNER_TOP_LEFT][state].height,
1113
1143
                requires_clearing);
1114
1144
        }
1115
1145
        frameSetShape (c, state, &frame_pix, button_x);
 
1146
 
1116
1147
        xfwmPixmapFree (&frame_pix.pm_title);
 
1148
        xfwmPixmapFree (&frame_pix.pm_sides[SIDE_TOP]);
1117
1149
        xfwmPixmapFree (&frame_pix.pm_sides[SIDE_BOTTOM]);
1118
1150
        xfwmPixmapFree (&frame_pix.pm_sides[SIDE_LEFT]);
1119
1151
        xfwmPixmapFree (&frame_pix.pm_sides[SIDE_RIGHT]);
1124
1156
        {
1125
1157
            xfwmWindowHide (&c->title);
1126
1158
        }
1127
 
        for (i = 0; i < 3; i++)
 
1159
        for (i = 0; i < 4; i++)
1128
1160
        {
1129
1161
            if (MYWINDOW_XWINDOW (c->sides[i]) && xfwmWindowVisible (&c->sides[i]))
1130
1162
            {
1138
1170
                xfwmWindowHide (&c->corners[i]);
1139
1171
            }
1140
1172
        }
1141
 
        for (i = 0; i < BUTTON_LAST; i++)
 
1173
        for (i = 0; i < BUTTON_COUNT; i++)
1142
1174
        {
1143
1175
            if (MYWINDOW_XWINDOW (c->buttons[i]) && xfwmWindowVisible (&c->buttons[i]))
1144
1176
            {
1153
1185
update_frame_idle_cb (gpointer data)
1154
1186
{
1155
1187
    Client *c;
1156
 
    
 
1188
 
1157
1189
    TRACE ("entering update_frame_idle_cb");
1158
1190
 
1159
1191
    c = (Client *) data;
1160
1192
    g_return_val_if_fail (c, FALSE);
1161
1193
 
1162
 
    frameDraw (c, TRUE);
 
1194
    frameDrawWin (c);
1163
1195
    c->frame_timeout_id = 0;
1164
1196
 
1165
1197
    return FALSE;
1180
1212
}
1181
1213
 
1182
1214
void
1183
 
frameQueueDraw (Client * c)
 
1215
frameDraw (Client * c, gboolean clear_all)
 
1216
{
 
1217
    g_return_if_fail (c);
 
1218
 
 
1219
    TRACE ("entering frameDraw for \"%s\" (0x%lx)", c->name, c->window);
 
1220
 
 
1221
    if (clear_all)
 
1222
    {
 
1223
        FLAG_SET (c->xfwm_flags, XFWM_FLAG_NEEDS_REDRAW);
 
1224
    }
 
1225
    frameDrawWin (c);
 
1226
}
 
1227
 
 
1228
void
 
1229
frameQueueDraw (Client * c, gboolean clear_all)
1184
1230
{
1185
1231
    g_return_if_fail (c);
1186
1232
 
1187
1233
    TRACE ("entering frameQueueDraw for \"%s\" (0x%lx)", c->name, c->window);
1188
1234
 
 
1235
    /* Reschedule update */
 
1236
    if (c->frame_timeout_id)
 
1237
    {
 
1238
        frameClearQueueDraw (c);
 
1239
    }
 
1240
    if (clear_all)
 
1241
    {
 
1242
        FLAG_SET (c->xfwm_flags, XFWM_FLAG_NEEDS_REDRAW);
 
1243
    }
 
1244
    /* Otherwise leave previous schedule */
1189
1245
    if (c->frame_timeout_id == 0)
1190
1246
    {
1191
 
        c->frame_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
 
1247
        c->frame_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
1192
1248
                                              update_frame_idle_cb, c, NULL);
1193
1249
    }
1194
1250
}