Commit Graph
38 Commits
Author SHA1 Message Date
Wez Furlong 70f09ef1b4 fix window size calculation when scaling changes
I noticed that we were relatively undersized for newly created
windows; there were two problems:

1. We weren't propagating the old rows and cols counts through
   to the speculative resize.
2. The speculative resize wasn't implemented on wayland, and
   needs a surprising amout of work to actually make the resize
   take effect.
2019-11-30 21:27:03 -08:00
Wez Furlong c03eda1279 window: fixup clipboard on macos 2019-11-29 12:47:56 -08:00
Wez Furlong 4ef20480c5 wayland: implement clipboard
This was honestly a PITA because of its complexity.  The `clipboard`
crate (now dropped as a dep) didn't support wayland, so I looked at
the `smithay-clipboard` crate, which caused all of my input to become
laggy just by enabling it--even without actually copying or pasting!

Both of those crates try to hide a number of details of working with
the clipboard from the embedding application, but that works against
our window crate implementation, so I decided to integrate it into
the window crate using Futures so that the underlying IPC timing and
potential for the peer to flake out are not completely hidden.

This first commit removes the SystemClipboard type from wezterm
and instead bridges the window crate clipboard to the term crate
Clipboard concept.

The clipboard must be associated with a window in order to function
at all on Wayland, to we place the get/set operations in WindowOps.

This commit effectively breaks the keyboard on the other window
environments; will fix those up in follow on commits.
2019-11-29 12:17:52 -08:00
Wez Furlong 51ada155df window: initial wayland render support 2019-11-27 16:39:00 -08:00
Wez Furlong 349a24ccd9 allow dragging by tab bar on linux
This works with X11 on fedora, but the window movement is ignored
by the xwayland machinery on chromeos.
2019-11-23 11:46:03 -08:00
Wez Furlong 14fbf43485 promise: more properly implement Future::poll
The future won't ever complete if you don't connect the waker
from the context!

Prove this out by making the windowops functions async and
verifying them in the async example
2019-11-23 08:16:12 -08:00
Wez Furlong fda9671197 rustfmt 1.39 2019-11-08 18:51:37 -08:00
Wez Furlong cb5e351187 macos: try to set the IME cursor position a bit better
Use the current terminal cursor position as the basis for the position
of the IME.
2019-11-04 00:11:27 -08:00
Wez Furlong 4e01dec636 font scaling now also resizes the window for opengl+software frontend 2019-10-27 17:48:02 -07:00
Wez Furlong f2fce18586 window: use wgl for opengl on windows 2019-10-24 19:12:18 -07:00
Wez Furlong 6a96b7ddea window: take a stabe at EGL for linux/windows
This doesn't initialize it at all properly yet, but is groundwork
for completing that work in a later commit
2019-10-24 15:54:41 -07:00
Wez Furlong 41e392fc79 we can now init opengl but not render it 2019-10-10 08:15:00 -07:00
Wez Furlong 2a19850350 add opengl frontend that sits on top of the window code
This uses the same plumbing as the software frontend, but tries
to enable opengl.

None of the opengl rendering is plumbed through here yet, so this
is currently functionally identical to the software renderer.
2019-10-07 07:51:49 -07:00
Wez Furlong 89a0046f5a window: A basic opengl capability 2019-10-07 07:17:57 -07:00
Wez Furlong 7e09492606 Add close operation on macos 2019-09-28 17:46:43 -07:00
Wez Furlong 709990b9e7 use euclid crate for point/rect 2019-09-21 13:05:50 -07:00
Wez Furlong 1950843de4 these rect methods should have been public 2019-09-21 08:03:14 -07:00
Wez Furlong 4e62b59628 rediscover the Rect type for x11 and consolidate 2019-09-21 08:01:31 -07:00
Wez Furlong 050dde6b4f clean up draw_image api 2019-09-21 07:44:28 -07:00
Wez Furlong 896586809f add Rect::bottom_right 2019-09-21 07:31:44 -07:00
Wez Furlong 6d902d8a39 introduce a Rect type 2019-09-21 00:19:31 -07:00
Wez Furlong 6e8424a92d refactor SpawnQueue on windows and x11 2019-09-15 19:09:08 -07:00
Wez Furlong cabb9d155c see if we can DRY around some cross platform stuff, baby step 2019-09-15 19:09:08 -07:00
Wez Furlong bdc634276d plumbing for polling std::future::futures on macos 2019-09-15 19:09:08 -07:00
Wez Furlong e98b29aec6 add apply function to safely access inner data 2019-09-15 19:09:08 -07:00
Wez Furlong 0b7556893d bunch of plumbing to allow using new window layer as software rendered frontend 2019-09-15 19:09:08 -07:00
Wez Furlong dff8e1e652 introduce WindowContext for manipulating the window in a callback 2019-09-15 19:09:08 -07:00
Wez Furlong e6265c93a4 add arbitrary line drawing with anti-aliasing 2019-09-15 19:09:08 -07:00
Wez Furlong e371e0385d x11: mouse cursors 2019-09-15 19:09:08 -07:00
Wez Furlong f8f470ab1d add mouse event processing for windows 2019-09-15 19:09:08 -07:00
Wez Furlong 93f4008719 add keyboard support for windows 2019-09-15 19:09:08 -07:00
Wez Furlong bed8664617 borrow input types from termwiz 2019-09-15 19:09:08 -07:00
Wez Furlong b9b94aa516 add resize callback 2019-09-15 19:09:08 -07:00
Wez Furlong dc6ef6c55d basic xcb windows too 2019-09-15 19:09:08 -07:00
Wez Furlong ddd323464b refactor traits to top level 2019-09-15 19:09:08 -07:00
Wez Furlong 311760df90 introduce a paint context trait 2019-09-15 19:09:08 -07:00
Wez Furlong f2928053aa resurrect bitmap render code from 236960e1a8
Earlier in the life of wezterm we had software rendering in src/xgfx.rs.
This is the bitmap portion of that code from rev
236960e1a8, tweaked slightly for more
recent changes to the palette crate.
2019-09-15 19:09:08 -07:00
Wez Furlong 276041a1db add very basic win32 window creation 2019-09-15 19:09:08 -07:00