~sil2100/compiz-core/fix-1019337.2-0.9.7

« back to all changes in this revision

Viewing changes to gtk/window-decorator/wnck.c

  • Committer: Daniel van Vugt
  • Date: 2012-07-12 03:48:09 UTC
  • Revision ID: daniel.van.vugt@canonical.com-20120712034809-aypbi4wfqarnzaaa
Backport from 0.9.8:
Fix gtk-window-decorator crash in meta_get_button_position (LP: #1015593)

Show diffs side-by-side

added added

removed removed

Lines of Context:
580
580
}
581
581
 
582
582
static void
 
583
set_context_if_decorated (decor_t *d, decor_context_t *context)
 
584
{
 
585
    if (d->decorated)
 
586
        d->context = context;
 
587
}
 
588
 
 
589
static void
583
590
active_window_changed (WnckScreen *screen)
584
591
{
585
592
    WnckWindow *win;
601
608
                {
602
609
                   if (d->active)
603
610
                   {
604
 
                       d->context = &frame->max_window_context_active;
 
611
                       set_context_if_decorated (d, &frame->max_window_context_active);
605
612
                       d->shadow  = frame->max_border_shadow_active;
606
613
                   }
607
614
                   else
608
615
                   {
609
 
                       d->context = &frame->max_window_context_inactive;
 
616
                       set_context_if_decorated (d, &frame->max_window_context_inactive);
610
617
                       d->shadow  = frame->max_border_shadow_inactive;
611
618
                   }
612
619
                }
621
628
               {
622
629
                   if (d->active)
623
630
                   {
624
 
                       d->context = &frame->window_context_active;
 
631
                       set_context_if_decorated (d, &frame->window_context_active);
625
632
                       d->shadow  = frame->border_shadow_active;
626
633
                   }
627
634
                   else
628
635
                   {
629
 
                       d->context = &frame->window_context_inactive;
 
636
                       set_context_if_decorated (d, &frame->window_context_inactive);
630
637
                       d->shadow  = frame->border_shadow_inactive;
631
638
                   }
632
639
               }
670
677
                {
671
678
                   if (d->active)
672
679
                   {
673
 
                       d->context = &frame->max_window_context_active;
 
680
                       set_context_if_decorated (d, &frame->max_window_context_active);
674
681
                       d->shadow  = frame->max_border_shadow_active;
675
682
                   }
676
683
                   else
677
684
                   {
678
 
                       d->context = &frame->max_window_context_inactive;
 
685
                       set_context_if_decorated (d, &frame->max_window_context_inactive);
679
686
                       d->shadow  = frame->max_border_shadow_inactive;
680
687
                   }
681
688
                }
690
697
                {
691
698
                   if (d->active)
692
699
                   {
693
 
                       d->context = &frame->window_context_active;
 
700
                       set_context_if_decorated (d, &frame->window_context_active);
694
701
                       d->shadow  = frame->border_shadow_active;
695
702
                   }
696
703
                   else
697
704
                   {
698
 
                       d->context = &frame->window_context_inactive;
 
705
                       set_context_if_decorated (d, &frame->window_context_inactive);
699
706
                       d->shadow  = frame->border_shadow_inactive;
700
707
                   }
701
708
                }