Skip to content

Conversation

dparnell
Copy link

@dparnell dparnell commented Mar 3, 2018

There are quite a few bugs that have been fixed in the upstream master that are still present in the windows branch. I've done a merge of master into the windows branch. It is almost working (at least it compiles). What I'm seeing is the app locks up if the config specifies that the window should have decorations. If I turn off decorations then it works but of course moving and resizing the window no longer work. Not being particularly familiar with rust I'm hoping you may be able to see what's going on. I'm looking at it here also.

thelearnerofcode and others added 30 commits November 11, 2017 08:23
Linefeeds should only move the cursor down if it's before the end of
the scroll region.

The "out of bounds" panic was triggered by linefeeds going off the
bottom of the screen when the scroll region end was above the cursor.

Note: https://vt100.net/docs/vt102-ug/chapter5.html
"Characters added outside the scrolling region do not cause the screen to scroll."
Outside of a scroll region, linefeed will still advances the line until
reaching the bottom row in other terminals. Alacritty now matches that.
There were two ref tests that were not being run. Oops!
Useful when requesting more info to help investigating issues.
* Support text cursor color escape codes
* Support reset color index escape code
* Support multiple colors in set color index escape code
…ritty#907)"

This reverts commit a931d69.

Please see alacritty#907 (comment)
for rationale w/ GIF.

> now alacritty starts "in stages". First it paints some small
> rectangle, and in a second in "boots" and fills up the available
> space.
The default cursor can now be configured through the cursor_style field
of the config. Valid options include Block, Underline, and Beam.

The default can be restored by sending \e[0q as in VTE terminals.

Live config reloading is supported for this parameter.
I dug into this and narrowed the issue down to the macOS app bundle
Info.plist file. So, I spun up a native macOS app real quick and tested
it by launching the binary directly and launching it via the app bundle.
When launching from the command line directly, it created multiple
windows & instances of the app. However, when launching via the app
bundle it behaved as I normally expect a macOS app to behave, that is
when launched multiple times to simply focus the already existing window
and instance.

This informed me that it wasn't something in code as much as it was
something in the app bundle configuration. Hence, I reworked the
Info.plist file based on the one that was created by XCode when I made
the native macOS app and it started behaving as expected.
Until winit gives us more capabilities in regard to window decorations
this implements a simple switch that renders the window without any
title bar or border
Move/rename borderless into window_config as decorations
chrisduerr and others added 13 commits January 30, 2018 18:59
Updated the lockfile to make sure clippy is building properly with the
latest nightly toolchain.
This cleans up a bunch of code.
The level of heading were one to high.
Upgrading glutin to the latest version allows building alacritty even
with old XRandr versions.

This is relevant for Debian machines (and other ancient systems).
@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

ok, now it is starting. However I am still seeing corruption when I run emacs inside a tmux session over ssh 😢

@zacps
Copy link
Owner

zacps commented Mar 3, 2018

I had been planning to wait until all the issues were sorted out with the windows build before rebasing on master, however it'd be a shame to throw away all of the work you did on the merge.
I'll take a look at it, did you see the corruption in the current windows branch?

@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

I only see the corruption on windows. On a mac it seems to render as expected.

@zacps
Copy link
Owner

zacps commented Mar 3, 2018

Sorry, I meant on my current windows branch; as in, did the rebase cause the issue or was it something that should have been fixed by a commit in the rebase.

@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

I was hoping it would be something that master should have fixed. I'm seeing the same behaviour on all windows branches that I've tried. There was a commit on master that sounded like it should fix a problem similar to this, but I guess there is something else wrong.

@zacps
Copy link
Owner

zacps commented Mar 3, 2018

Other than that the changes look good to me. Could you give me a little more detail on the corruption issue? Screenshots, steps to reproduce, etc.

@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

To reproduce this:

2018-03-03

  1. ssh user@linuxbox
  2. tmux
  3. Control-B % - split horizontally
  4. htop

#[cfg(not(windows))]
let initially_shown = false;
#[cfg(windows)]
let initially_shown = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What commit is this from? I heard something about this being an issue on OSX, why is it just windows that has a window that's initially shown?

Copy link
Author

@dparnell dparnell Mar 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was some code I wrote to stop the app from locking up at the start. I've not had any problems running master under MacOS

@zacps
Copy link
Owner

zacps commented Mar 3, 2018

I got some weird artifacts from resizing but nothing that I haven't seen before from an SSH connection.

As this isn't a regression I'm going to merge this. If it happens consistently feel free to open an issue, though it might be hard for me to diagnose.
My guess is it's an issue with winpty, if anything because winpty manages the buffer and alacritty just forwards events to it.

@zacps zacps merged commit e679680 into zacps:windows Mar 3, 2018
@zacps zacps mentioned this pull request Mar 3, 2018
@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

Yeah, I'm guessing it is something related to winpty. It's almost like it is somehow not correctly handling scrolling regions. I suspect that if I split the tmux session the other way I will not see the same issues.

@dparnell
Copy link
Author

dparnell commented Mar 3, 2018

Interestingly I am not seeing as many issues if I use screen rather than tmux

@dparnell
Copy link
Author

dparnell commented Mar 4, 2018

It seems to be behaving in the same way as this bug: alacritty#747

@dparnell
Copy link
Author

I just thought I'd try something and I ran up a standard Windows cmd window and used that to run ssh to connect to my Linux machine and I'm seeing exactly the same behavior as in Alacritty. This means the problem is somewhere else. Maybe the ssh client I'm using is rubbish. I'll look around and see what I can see.

@dparnell
Copy link
Author

I have installed the official Windows 10 SSH client and it seems to behave properly. I was using the Cygwin SSH client and it looks like this was fighting with WinPTY. Now to get the Alt key working properly so I can run Emacs 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.