Diff

Differences From Artifact [b6eb8ac6dc]:

To Artifact [cdf75216c5]:


67
68
69
70
71
72
73
74



75
76
77
78
79
80

81
82
83
84
85
86
87
67
68
69
70
71
72
73

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90







-
+
+
+






+







			unsigned char *output);
static void cfgtopalette(void);
static void init_palette(void);
static void init_fonts(int);
static void another_font(int);
static void deinit_fonts(void);

static int extra_width, extra_height;
static int full_screen = 0, extra_width, extra_height;
static LONG old_wind_style;
static WINDOWPLACEMENT old_wind_placement;

static int pending_netevent = 0;
static WPARAM pend_netevent_wParam = 0;
static LPARAM pend_netevent_lParam = 0;
static void enact_pending_netevent(void);
static void flash_window(int mode);
static void flip_full_screen(void);

static time_t last_movement = 0;

#define FONT_NORMAL 0
#define FONT_BOLD 1
#define FONT_UNDERLINE 2
#define FONT_BOLDUND 3
2547
2548
2549
2550
2551
2552
2553




2554
2555
2556
2557
2558
2559
2560
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567







+
+
+
+







	}
	if (left_alt && wParam == VK_F4 && cfg.alt_f4) {
	    return -1;
	}
	if (left_alt && wParam == VK_SPACE && cfg.alt_space) {
	    SendMessage(hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
	    return -1;
	}
	if (left_alt && wParam == VK_RETURN && cfg.fullscreenonaltenter) {
	    flip_full_screen();
	    return -1;
	}
	/* Control-Numlock for app-keypad mode switch */
	if (wParam == VK_PAUSE && shift_state == 2) {
	    app_keypad_keys ^= 1;
	    return 0;
	}

3411
3412
3413
3414
3415
3416
3417
























3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
	}
    }
    /* Otherwise, either visual bell or disabled; do nothing here */
    if (!has_focus) {
	flash_window(2);	       /* start */
    }
}

/*
 * Toggle full screen mode. Thanks to cwis@nerim.fr for the
 * implementation.
 */
static void flip_full_screen(void)
{
    if (!full_screen) {
	int cx, cy;

	cx = GetSystemMetrics(SM_CXSCREEN);
	cy = GetSystemMetrics(SM_CYSCREEN);
	GetWindowPlacement(hwnd, &old_wind_placement);
	old_wind_style = GetWindowLong(hwnd, GWL_STYLE);
	SetWindowLong(hwnd, GWL_STYLE,
		      old_wind_style & ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME));
	SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW);
	full_screen = 1;
    } else {
	SetWindowLong(hwnd, GWL_STYLE, old_wind_style);
	SetWindowPlacement(hwnd,&old_wind_placement);
	full_screen = 0;
    }
}