Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.c
| Show First 20 Lines • Show All 2,395 Lines • ▼ Show 20 Lines | case EVT_FILESELECT_EXTERNAL_CANCEL: { | ||||
| ScrArea *ctx_sa = CTX_wm_area(C); | ScrArea *ctx_sa = CTX_wm_area(C); | ||||
| for (temp_win = wm->windows.first; temp_win; temp_win = temp_win->next) { | for (temp_win = wm->windows.first; temp_win; temp_win = temp_win->next) { | ||||
| bScreen *screen = WM_window_get_active_screen(temp_win); | bScreen *screen = WM_window_get_active_screen(temp_win); | ||||
| ScrArea *file_sa = screen->areabase.first; | ScrArea *file_sa = screen->areabase.first; | ||||
| if (screen->temp && (file_sa->spacetype == SPACE_FILE)) { | if (screen->temp && (file_sa->spacetype == SPACE_FILE)) { | ||||
| int win_size[2]; | int win_size[2]; | ||||
| bool is_maximized; | |||||
| /* Get DPI/pixelsize independent size to be stored in preferences. */ | ED_fileselect_window_params_get(temp_win, win_size, &is_maximized); | ||||
| WM_window_set_dpi(temp_win); /* Ensure the DPI is taken from the right window. */ | ED_fileselect_params_to_userdef(file_sa->spacedata.first, win_size, is_maximized); | ||||
| win_size[0] = WM_window_pixels_x(temp_win) / UI_DPI_FAC; | |||||
| win_size[1] = WM_window_pixels_y(temp_win) / UI_DPI_FAC; | |||||
| ED_fileselect_params_to_userdef(file_sa->spacedata.first, win_size); | |||||
| if (BLI_listbase_is_single(&file_sa->spacedata)) { | if (BLI_listbase_is_single(&file_sa->spacedata)) { | ||||
| BLI_assert(ctx_win != temp_win); | BLI_assert(ctx_win != temp_win); | ||||
| wm_window_close(C, wm, temp_win); | wm_window_close(C, wm, temp_win); | ||||
| CTX_wm_window_set(C, ctx_win); // wm_window_close() NULLs. | CTX_wm_window_set(C, ctx_win); // wm_window_close() NULLs. | ||||
| /* Some operators expect a drawable context (for EVT_FILESELECT_EXEC) */ | /* Some operators expect a drawable context (for EVT_FILESELECT_EXEC) */ | ||||
| Show All 13 Lines | case EVT_FILESELECT_EXTERNAL_CANCEL: { | ||||
| ED_area_prevspace(C, file_sa); | ED_area_prevspace(C, file_sa); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (!temp_win && ctx_sa->full) { | if (!temp_win && ctx_sa->full) { | ||||
| ED_fileselect_params_to_userdef(ctx_sa->spacedata.first, NULL); | ED_fileselect_params_to_userdef(ctx_sa->spacedata.first, NULL, false); | ||||
| ED_screen_full_prevspace(C, ctx_sa); | ED_screen_full_prevspace(C, ctx_sa); | ||||
| } | } | ||||
| } | } | ||||
| wm_handler_op_context(C, handler, ctx_win->eventstate); | wm_handler_op_context(C, handler, ctx_win->eventstate); | ||||
| /* needed for UI_popup_menu_reports */ | /* needed for UI_popup_menu_reports */ | ||||
| ▲ Show 20 Lines • Show All 2,944 Lines • Show Last 20 Lines | |||||