~ubuntu-branches/ubuntu/utopic/freerdp/utopic

« back to all changes in this revision

Viewing changes to client/X11/xfreerdp.c

  • Committer: Package Import Robot
  • Author(s): Otavio Salvador, Jeremy Bicha
  • Date: 2012-02-11 10:34:05 UTC
  • mfrom: (1.1.7) (9.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120211103405-mk0gjhjn70eeyxul
Tags: 1.0.1-1
[ Jeremy Bicha ]
* New upstream release. Closes: #659332.
* Updated symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
547
547
 
548
548
        xf_kbd_init(xfi);
549
549
 
550
 
        xfi->clrconv = xnew(CLRCONV);
551
 
        xfi->clrconv->alpha = true;
552
 
        xfi->clrconv->invert = false;
553
 
        xfi->clrconv->rgb555 = false;
554
 
        xfi->clrconv->palette = xnew(rdpPalette);
 
550
        xfi->clrconv = freerdp_clrconv_new(CLRCONV_ALPHA);
555
551
 
556
552
        instance->context->cache = cache_new(instance->settings);
557
553
 
647
643
                xfi->srcBpp = instance->settings->color_depth;
648
644
                xf_gdi_register_update_callbacks(instance->update);
649
645
 
650
 
                xfi->hdc = gdi_GetDC();
651
 
                xfi->hdc->bitsPerPixel = xfi->bpp;
652
 
                xfi->hdc->bytesPerPixel = xfi->bpp / 8;
653
 
 
654
 
                xfi->hdc->alpha = xfi->clrconv->alpha;
655
 
                xfi->hdc->invert = xfi->clrconv->invert;
656
 
                xfi->hdc->rgb555 = xfi->clrconv->rgb555;
657
 
 
658
 
                xfi->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
659
 
                xfi->hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0);
660
 
                xfi->hdc->hwnd->invalid->null = 1;
661
 
 
662
 
                xfi->hdc->hwnd->count = 32;
663
 
                xfi->hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * xfi->hdc->hwnd->count);
664
 
                xfi->hdc->hwnd->ninvalid = 0;
665
 
 
666
 
                xfi->primary_buffer = (uint8*) xzalloc(xfi->width * xfi->height * xfi->bpp);
 
646
                xfi->hdc = gdi_CreateDC(xfi->clrconv, xfi->bpp);
667
647
 
668
648
                if (instance->settings->rfx_codec)
669
649
                {
755
735
 
756
736
boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint)
757
737
{
 
738
        char answer;
 
739
 
758
740
        printf("Certificate details:\n");
759
741
        printf("\tSubject: %s\n", subject);
760
742
        printf("\tIssuer: %s\n", issuer);
763
745
                "the CA certificate in your certificate store, or the certificate has expired. "
764
746
                "Please look at the documentation on how to create local certificate store for a private CA.\n");
765
747
 
766
 
        char answer;
767
748
        while (1)
768
749
        {
769
750
                printf("Do you trust the above certificate? (Y/N) ");
777
758
                {
778
759
                        break;
779
760
                }
 
761
                printf("\n");
780
762
        }
781
763
 
782
764
        return false;
884
866
        XFreeGC(xfi->display, xfi->gc);
885
867
        xfi->gc = 0;
886
868
 
 
869
        XFreeGC(xfi->display, xfi->gc_mono);
 
870
        xfi->gc_mono = 0;
 
871
 
887
872
        if (xfi->window != NULL)
888
873
        {
889
874
                xf_DestroyWindow(xfi, xfi->window);
905
890
 
906
891
        if (context != NULL)
907
892
        {
908
 
                if (context->cache != NULL)
909
 
                {
910
893
                        cache_free(context->cache);
911
894
                        context->cache = NULL;
912
 
                }
913
 
                if (context->rail != NULL)
914
 
                {
 
895
 
915
896
                        rail_free(context->rail);
916
897
                        context->rail = NULL;
917
 
                }
918
898
        }
919
899
 
920
900
        if (xfi->rfx_context) 
922
902
                rfx_context_free(xfi->rfx_context);
923
903
                xfi->rfx_context = NULL;
924
904
        }
925
 
        
926
 
        xfree(xfi->clrconv);
 
905
 
 
906
        freerdp_clrconv_free(xfi->clrconv);
 
907
 
 
908
        if (xfi->hdc)
 
909
                gdi_DeleteDC(xfi->hdc);
927
910
 
928
911
        xf_tsmf_uninit(xfi);
929
912
        xf_cliprdr_uninit(xfi);
932
915
void xf_free(xfInfo* xfi)
933
916
{
934
917
        xf_window_free(xfi);
 
918
 
 
919
        xfree(xfi->bmp_codec_none);
 
920
 
935
921
        XCloseDisplay(xfi->display);
 
922
 
936
923
        xfree(xfi);
937
924
}
938
925
 
963
950
        xfi = ((xfContext*) instance->context)->xfi;
964
951
        channels = instance->context->channels;
965
952
 
966
 
        while (!xfi->disconnect)
 
953
        while (!xfi->disconnect && !freerdp_shall_disconnect(instance))
967
954
        {
968
955
                rcount = 0;
969
956
                wcount = 0;
1073
1060
        if (g_thread_count < 1)
1074
1061
                freerdp_sem_signal(g_sem);
1075
1062
 
1076
 
        return NULL;
 
1063
        pthread_exit(NULL);
1077
1064
}
1078
1065
 
1079
1066
static uint8 exit_code_from_disconnect_reason(uint32 reason)