Mercurial > hg > xemacs-beta
comparison src/event-msw.c @ 294:4b85ae5eabfb r21-0b45
Import from CVS: tag r21-0b45
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:38:01 +0200 |
parents | c9fe270a4101 |
children | 70ad99077275 |
comparison
equal
deleted
inserted
replaced
293:403535bfea94 | 294:4b85ae5eabfb |
---|---|
1891 magic events to run these hooks instead - kkm */ | 1891 magic events to run these hooks instead - kkm */ |
1892 | 1892 |
1893 if (wParam==SIZE_MINIMIZED) | 1893 if (wParam==SIZE_MINIMIZED) |
1894 { | 1894 { |
1895 /* Iconified */ | 1895 /* Iconified */ |
1896 FRAME_VISIBLE_P (frame) = 0; | 1896 FRAME_VISIBLE_P (frame) = 0; |
1897 mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); | 1897 mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); |
1898 } | 1898 } |
1899 else | 1899 else |
1900 { | 1900 { |
1901 GetClientRect(hwnd, &rect); | 1901 GetClientRect(hwnd, &rect); |
1909 pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows); | 1909 pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows); |
1910 change_frame_size (frame, rows, columns, 1); | 1910 change_frame_size (frame, rows, columns, 1); |
1911 | 1911 |
1912 /* If we are inside frame creation, we have to apply geometric | 1912 /* If we are inside frame creation, we have to apply geometric |
1913 properties now. */ | 1913 properties now. */ |
1914 if (mswindows_frame_target_rect.left >= 0 | 1914 if (FRAME_MSWINDOWS_TARGET_RECT (frame)) |
1915 || mswindows_frame_target_rect.top >= 0 | |
1916 || mswindows_frame_target_rect.width >= 0 | |
1917 || mswindows_frame_target_rect.height >= 0) | |
1918 { | 1915 { |
1919 /* Yes, we have to size again */ | 1916 /* Yes, we have to size again */ |
1920 XEMACS_RECT_WH geom; | 1917 mswindows_size_frame_internal ( frame, |
1921 | 1918 FRAME_MSWINDOWS_TARGET_RECT |
1922 geom.left = mswindows_frame_target_rect.left; | 1919 (frame)); |
1923 geom.top = mswindows_frame_target_rect.top; | |
1924 char_to_real_pixel_size (frame, | |
1925 mswindows_frame_target_rect.width, | |
1926 mswindows_frame_target_rect.height, | |
1927 &geom.width, &geom.height); | |
1928 if (mswindows_frame_target_rect.width < 0) | |
1929 geom.width = -1; | |
1930 if (mswindows_frame_target_rect.height < 0) | |
1931 geom.height = -1; | |
1932 | |
1933 /* Reset to we do not get here again */ | 1920 /* Reset to we do not get here again */ |
1934 mswindows_frame_target_rect.left = -1; | 1921 xfree (FRAME_MSWINDOWS_TARGET_RECT (frame)); |
1935 mswindows_frame_target_rect.top = -1; | 1922 FRAME_MSWINDOWS_TARGET_RECT (frame) = 0; |
1936 mswindows_frame_target_rect.width = -1; | |
1937 mswindows_frame_target_rect.height = -1; | |
1938 | |
1939 /* Size the rectangle to the actual size */ | |
1940 GetWindowRect (hwnd, &rect); | |
1941 SetWindowPos | |
1942 (hwnd, NULL, | |
1943 geom.left >= 0 ? geom.left : rect.left, | |
1944 geom.top >= 0 ? geom.top : rect.top, | |
1945 geom.width >= 0 ? geom.width : rect.right - rect.left, | |
1946 geom.height >= 0 ? geom.height : rect.bottom - rect.top, | |
1947 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSENDCHANGING | |
1948 | ((geom.left >= 0 || geom.top >= 0) ? 0 : SWP_NOMOVE) | |
1949 | ((geom.width >= 0 || geom.height >= 0) ? 0 : SWP_NOSIZE)); | |
1950 } | 1923 } |
1951 else | 1924 else |
1952 { | 1925 { |
1953 if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) | 1926 if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) |
1954 mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); | 1927 mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); |