1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
HDC hdc;
static int ignore_clip = FALSE;
static int need_backend_resize = FALSE;
static int fullscr_on_max = FALSE;
static UINT last_mousemove = 0;
switch (message) {
case WM_TIMER:
if ((UINT_PTR)wParam == TIMING_TIMER_ID) {
long next;
|
>
|
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
HDC hdc;
static int ignore_clip = FALSE;
static int need_backend_resize = FALSE;
static int fullscr_on_max = FALSE;
static int processed_resize = FALSE;
static UINT last_mousemove = 0;
switch (message) {
case WM_TIMER:
if ((UINT_PTR)wParam == TIMING_TIMER_ID) {
long next;
|
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
|
LOWORD(lParam), HIWORD(lParam)));
#endif
if (wParam == SIZE_MINIMIZED)
SetWindowText(hwnd,
cfg.win_name_always ? window_name : icon_name);
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED)
SetWindowText(hwnd, window_name);
if (wParam == SIZE_RESTORED)
clear_full_screen();
if (wParam == SIZE_MAXIMIZED && fullscr_on_max) {
fullscr_on_max = FALSE;
make_full_screen();
}
if (cfg.resize_action == RESIZE_DISABLED) {
/* A resize, well it better be a minimize. */
reset_window(-1);
} else {
int width, height, w, h;
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
|
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
|
LOWORD(lParam), HIWORD(lParam)));
#endif
if (wParam == SIZE_MINIMIZED)
SetWindowText(hwnd,
cfg.win_name_always ? window_name : icon_name);
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED)
SetWindowText(hwnd, window_name);
if (wParam == SIZE_RESTORED) {
processed_resize = FALSE;
clear_full_screen();
if (processed_resize) {
/*
* Inhibit normal processing of this WM_SIZE; a
* secondary one was triggered just now by
* clear_full_screen which contained the correct
* client area size.
*/
return 0;
}
}
if (wParam == SIZE_MAXIMIZED && fullscr_on_max) {
fullscr_on_max = FALSE;
processed_resize = FALSE;
make_full_screen();
if (processed_resize) {
/*
* Inhibit normal processing of this WM_SIZE; a
* secondary one was triggered just now by
* make_full_screen which contained the correct client
* area size.
*/
return 0;
}
}
processed_resize = TRUE;
if (cfg.resize_action == RESIZE_DISABLED) {
/* A resize, well it better be a minimize. */
reset_window(-1);
} else {
int width, height, w, h;
|