Compare commits

..

8 Commits

Author SHA1 Message Date
Kovid Goyal
350cfeb7ef version 0.14.6 2019-09-25 11:28:55 +05:30
Kovid Goyal
97d379b13e Add changelog entry for DPI change PR 2019-09-25 06:34:55 +05:30
Kovid Goyal
2154d555e5 Merge branch 'update_check_interval_constant' of https://github.com/Luflosi/kitty 2019-09-25 06:23:05 +05:30
Luflosi
1389c36657 Use the update CHECK_INTERVAL constant 2019-09-25 02:46:19 +02:00
Kovid Goyal
bd1e7d6942 Merge branch 'master' of https://github.com/dcolascione/kitty 2019-09-25 05:56:17 +05:30
Daniel Colascione
91299a279b Fix window resize on DPI change 2019-09-24 12:41:23 -07:00
Kovid Goyal
fb1c318a09 macOS: Fix a regression in the previous release that caused a crash when pressing a unprintable key, such as the POWER key
Fixes #1997
2019-09-24 16:07:52 +05:30
Kovid Goyal
2a07b3f46a Fix #1995 2019-09-24 06:40:21 +05:30
6 changed files with 25 additions and 10 deletions

View File

@@ -4,6 +4,16 @@ Changelog
|kitty| is a feature full, cross-platform, *fast*, GPU based terminal emulator.
To update |kitty|, :doc:`follow the instructions <binary>`.
0.14.6 [2019-09-25]
---------------------
- macOS: Fix a regression in the previous release that caused a crash when
pressing a unprintable key, such as the POWER key (:iss:`1997`)
- Fix a regression in the previous release that caused kitty to not always
respond to DPI changes (:pull:`1999`)
0.14.5 [2019-09-23]
---------------------

View File

@@ -345,10 +345,12 @@ static int translateKey(unsigned int key, bool apply_keymap)
// Look for the effective key name after applying any keyboard layouts/mappings
const char *name_chars = _glfwPlatformGetScancodeName(key);
uint32_t name = 0;
for (int i = 0; i < 4; i++) {
if (!name_chars[i]) break;
name <<= 8;
name |= (uint8_t)name_chars[i];
if (name_chars) {
for (int i = 0; i < 4; i++) {
if (!name_chars[i]) break;
name <<= 8;
name |= (uint8_t)name_chars[i];
}
}
if (name) {
// Key name

View File

@@ -1100,7 +1100,9 @@ with::
'''))
if is_macos:
k('new_window', 'cmd+enter', 'new_window', _('New window'), add_to_docs=False)
k('new_os_window', 'kitty_mod+n', 'new_os_window', _('New OS window'))
k('new_os_window', 'kitty_mod+n', 'new_os_window', _('New OS window'), _(
'Works like new_window above, except that it opens a top level OS kitty window.'
' In particular you can use new_os_window_with_cwd to open a window with the current working directory.'))
if is_macos:
k('new_os_window', 'cmd+n', 'new_os_window', _('New OS window'), add_to_docs=False)
k('close_window', 'kitty_mod+w', 'close_window', _('Close window'))

View File

@@ -9,7 +9,7 @@ from collections import namedtuple
from contextlib import suppress
appname = 'kitty'
version = (0, 14, 5)
version = (0, 14, 6)
str_version = '.'.join(map(str, version))
_plat = sys.platform.lower()
is_macos = 'darwin' in _plat

View File

@@ -41,7 +41,10 @@ update_os_window_viewport(OSWindow *window, bool notify_boss) {
int w, h, fw, fh;
glfwGetFramebufferSize(window->handle, &fw, &fh);
glfwGetWindowSize(window->handle, &w, &h);
if (fw == window->viewport_width && fh == window->viewport_height && w == window->window_width && h == window->window_height) {
double xdpi = window->logical_dpi_x, ydpi = window->logical_dpi_y;
set_os_window_dpi(window);
if (fw == window->viewport_width && fh == window->viewport_height && w == window->window_width && h == window->window_height && xdpi == window->logical_dpi_x && ydpi == window->logical_dpi_y) {
return; // no change, ignore
}
if (w <= 0 || h <= 0 || fw / w > 5 || fh / h > 5 || fw < min_width || fh < min_height || fw < w || fh < h) {
@@ -62,8 +65,6 @@ update_os_window_viewport(OSWindow *window, bool notify_boss) {
double xr = window->viewport_x_ratio, yr = window->viewport_y_ratio;
window->viewport_x_ratio = w > 0 ? (double)window->viewport_width / (double)w : xr;
window->viewport_y_ratio = h > 0 ? (double)window->viewport_height / (double)h : yr;
double xdpi = window->logical_dpi_x, ydpi = window->logical_dpi_y;
set_os_window_dpi(window);
bool dpi_changed = (xr != 0.0 && xr != window->viewport_x_ratio) || (yr != 0.0 && yr != window->viewport_y_ratio) || (xdpi != window->logical_dpi_x) || (ydpi != window->logical_dpi_y);
window->viewport_size_dirty = true;

View File

@@ -117,6 +117,6 @@ def update_check(timer_id=None):
return True
def run_update_check(interval=24 * 60 * 60):
def run_update_check(interval=CHECK_INTERVAL):
if update_check():
add_timer(update_check, interval)