Changeset 3914 for pjproject


Ignore:
Timestamp:
Dec 19, 2011 6:16:34 AM (13 years ago)
Author:
ming
Message:

Fixed #1429: Problem with SDL on setting window's position when window is hidden

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c

    r3893 r3914  
    10941094 
    10951095    if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION) { 
     1096        /** 
     1097         * Setting window's position when the window is hidden also sets 
     1098         * the window's flag to shown (while the window is, actually, 
     1099         * still hidden). This causes problems later when setting/querying 
     1100         * the window's visibility. 
     1101         * See ticket #1429 (http://trac.pjsip.org/repos/ticket/1429) 
     1102         */ 
     1103        Uint32 flag = SDL_GetWindowFlags(strm->window); 
     1104        if (flag & SDL_WINDOW_HIDDEN) 
     1105            SDL_ShowWindow(strm->window); 
    10961106        SDL_SetWindowPosition(strm->window, ((pjmedia_coord *)pval)->x, 
    10971107                              ((pjmedia_coord *)pval)->y); 
     1108        if (flag & SDL_WINDOW_HIDDEN) 
     1109            SDL_HideWindow(strm->window); 
    10981110        return PJ_SUCCESS; 
    10991111    } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE) { 
Note: See TracChangeset for help on using the changeset viewer.