aboutsummaryrefslogtreecommitdiff
path: root/wayland.h (follow)
Commit message (Collapse)AuthorAgeLines
...
* config: add ‘select-extend-character-wise’ bind actionDaniel Eklöf2021-01-14-0/+1
| | | | | | | This forces the (new) selection mode to be character-wise when extending a word- or line-wise selection. Default key binding is ctrl+RMB.
* wayland: take rotation into account when calculating the logical PPIDaniel Eklöf2021-01-11-0/+1
|
* input: rework mouse button/motion handlingDaniel Eklöf2020-12-12-14/+11
| | | | | | | | | | | | | | | | | | | Store a list of currently pressed buttons, and which surface they belong to (i.e. which surface that received the press). Then, in motion events (with a button pressed, aka drag operations), send the event to the “original” surface (that received the press). Also send release events to the originating surface. This means a surface receiving a press will always receive a corresponding release. And no one will receive a release event without a corresponding press event. Motion events with a button pressed will *always* use the *first* button that was pressed. I.e. if you press a button, start dragging, and then press another button, we keep generating motion events for the *first* button.
* input: report mouse drag events also when the pointer is outside the gridDaniel Eklöf2020-12-11-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as the mouse button was *pressed* while the pointer was inside the grid, we want to keep reporting motion events until the button is released. Even when the pointer moves outside the grid (but in this case, the reported coordinates are bounded by the grid size). This patch also tries to improve multi-button handling (i.e. multiple buttons pressed at the same time), and the events we report to the client for these, in the following ways: * Motion events now report the *initial* button. That is, if you start a drag operation with the LEFT button, then press RIGHT (before releasing LEFT), keep reporting LEFT in the motion events. * Mouse release events are reported for *any* button, as long as the pointer is *inside* the grid, *or*, the button released was the button used to start a drag operation. The last point is important; if we have reported a button press followed by motion events (i.e. a drag operation), we need to report the button release, *even* if the pointer is outside the grid. Note that the client may receive unbalanced button press/release events in the following ways if the user pressed one, and then a second button *inside* the grid, then releases the *first* button (possibly outside the grid), and finally releases the *second* button *outside* the grid. In this case, both buttons will report press events. The first button will report a release event since it is the initial button in the drag operation. However, we don’t track the fact that the second button is being pressed, and thus if it is released outside the grid, it wont generate a release event.
* Merge branch 'remove-deprecated-things'Daniel Eklöf2020-12-09-2/+0
|\
| * config: remove support for scrollback-up and scrollback-downDaniel Eklöf2020-12-08-2/+0
| |
* | ime: make IME compile-time optionalDaniel Eklöf2020-12-07-0/+4
| |
* | ime: render pre-edit textDaniel Eklöf2020-12-07-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by allocating cells for the pre-edit text when receiving the text-input::done() call, and populating them by converting the utf-8 formatted pre-edit text to wchars. We also convert the pre-edit cursor position to cell positions (it can cover multiple cells). When rendering, we simply render the pre-edit cells on-top off the regular grid. While doing so, we also mark the underlying, “real”, cells as dirty, to ensure they are re-rendered when the pre-edit text is modified or removed.
* | ime: wip: commit all changes in ‘done()’Daniel Eklöf2020-12-07-2/+18
| |
* | ime: wip: add text-input object to seatDaniel Eklöf2020-12-07-0/+7
|/
* input: relax requirements for overriding keypad application modeDaniel Eklöf2020-12-01-2/+0
| | | | | | Don’t require NumLock to be locked. Foot has no idea _which_ modifier the user has mapped NumLock to, meaning we really cannot require it to be locked.
* wayland: Use wl_output_release with wl_output v3Kenny Levinsen2020-11-24-0/+2
| | | | | | | | | | | | | wl_output_release, the use of which was recently introduced, is not available until wl_output interface version 3. However, only wl_output version 2 was bound. This lead to protocol errors when a display was disconnected, causing foot to terminate. Instead, only use wl_output_release if wl_output version 3 is provided and bound. Otherwise, just use wl_output_destroy. Closes: https://codeberg.org/dnkl/foot/issues/219
* input: track num lock stateDaniel Eklöf2020-11-11-0/+2
|
* config: add support for pipe-* actions in mouse bindingsDaniel Eklöf2020-11-06-0/+1
| | | | Closes #183
* search: add {clipboard,primary}-paste key bindingsDaniel Eklöf2020-11-01-0/+2
| | | | | | | | | | These bindings copy from the clipboard or primary selection into the search buffer. Default bindings: * clipboard-paste: ctrl+v, ctrl+y * primary-paste: shift+insert
* selection: add support for different mime-typesDaniel Eklöf2020-10-28-5/+12
| | | | | | Add support for `text/plain`, `text/plain;charset=utf-8` and `text/uri-list` to regular copy operations (both from clipboard and primary selection) and drag-and-drop operations.
* selection: implement support for drag-and-dropDaniel Eklöf2020-10-26-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We accept COPY and MOVE actions, for text/plain;charset=utf-8 mime-types. To implement DnD, we need to track the current DnD data offer *and* the terminal instance it is (currently) targeting. To do this, a seat has a new member, ‘dnd_term’. On a DnD enter event, we lookup the corresponding terminal instance and point ‘dnd_term’ to it. On a DnD leave event, ‘dnd_term’ is reset. The DnD data offer is tracked in the terminal’s wayland window instance. It is reset, along with the seat’s ‘dnd_term’ on a DnD leave event. On a drop event, we immediately clear the seat’s ‘dnd_term’, to ensure we don’t reset it, or destroy the offer before the drop has been completed. The drop’s ‘done()’ callback takes care of destroying and resetting the DnD offer in the terminal’s wayland window instance. Closes #175
* wayland: properly restore window size when being un-tiledDaniel Eklöf2020-10-20-0/+9
| | | | | | | | Bind to xdg-shell version 2 if available, as this enables us to track our window’s ‘tiled’ state in the ‘configure’ events. This in turn allows us to stash the ‘old’ window size when being tiled, to be used again when restoring the window size when un-tiled.
* input: don’t use stale keycodes for arrow-up/downDaniel Eklöf2020-09-15-0/+3
| | | | | | | The keycodes will change if the seat’s keymap changes. Make sure we only do alternate scrolling if the seat has a keyboard, and use the *current* layout’s keycodes for arrow up/down (instead of the *first* layout’s).
* key-binding: deprecate scrollback-up/down, add scrollback-up/down-lineDaniel Eklöf2020-09-10-4/+8
| | | | | | | | This deprecates/renames scrollback-up/down to scrollback-up/down-page. It also renames scrollback-up/down-half to scrollback-up/down-half-page, and adds the new bindings scrollback-up/down-line.
* config: add scrollback-{up,down}-half key bindingsDaniel Eklöf2020-09-09-0/+2
| | | | | | | | These new bindings scroll up/down half a page in the scrollback (instead of the full page scrolled by ‘scrollback-{up,down}’). Closes #128.
* wayland: set BIND_ACTION_KEY_COUNT correctlyDaniel Eklöf2020-09-08-3/+2
| | | | | | | This fixes an issue where ‘pipe-selected’ were not recognized as a valid key action. Closes #125
* input: inhibit mouse events to client when a binding has consumed itDaniel Eklöf2020-08-22-0/+1
| | | | | | | | | | This introduces a new state to a seat's mouse struct, 'consumed'. It is set on a mouse *press* event that is claimed by a mouse binding. It is cleared after a mouse *release* event. While set, *no* mouse motion or button events are sent to the client application.
* config: mouse bindings: add select-begin-block and select-rowDaniel Eklöf2020-08-14-1/+3
|
* config: add mouse specific bind actionsDaniel Eklöf2020-08-14-0/+9
| | | | | | | | | | | | | | | | | | | | This extends the "normal" bind action enum with mouse specific actions. When parsing key bindings, we only check up to the last valid keyboard binding, while mouse bindings support *both* key actions and mouse actions. The new actions are: * select-begin: starts an interactive selection * select-extend: interactively extend an existing selection * select-word: select word under cursor * select-word-whitespace: select word under cursor, where the only word separating characters are whitespace characters. The old hard-coded selection "bindings" have been converted to instead use these actions, via default bindings added to the configuration.
* config: wip: add support for modifiers in mouse bindingsDaniel Eklöf2020-08-13-0/+4
| | | | | | | Mouse bindings can now include modifiers. They are specified in pretty much the same way as in keyboard bindings: Control+BTN_LEFT
* config: add tweak.render-timer optionDaniel Eklöf2020-08-13-0/+3
| | | | | | | | | This can be set to 'none' (the default), 'osd', 'log' or 'both'. When 'osd' is enabled, we'll render the frame rendering time to a sub-surface after each frame. When 'log' is enabled, the frame rendering time is logged on stderr.
* config: add 'hide-when-typing'Daniel Eklöf2020-07-31-0/+1
| | | | | | When enabled, the mouse cursor is hidden when the user types in the terminal. It is un-hidden when the user moves the mouse, or when the window loses keyboard focus.
* config: add 'pipe-selected' key bindingDaniel Eklöf2020-07-31-0/+1
| | | | | | | This works just like pipe-visible and pipe-scrollback, but pipes the user-selected text, if any, to the external tool. Closes #51
* config: tokenize key bindings' pipe command when loading the configurationDaniel Eklöf2020-07-30-1/+1
| | | | | | This allows us to detect syntax errors early on, and is also more efficient since we don't have to re-tokenize the command line every time the binding is executed.
* Merge branch 'master' into diagonal-dpiDaniel Eklöf2020-07-28-0/+3
|\
| * wayland: add scrollback indicator surface + sub-surface to wl_windowDaniel Eklöf2020-07-26-0/+3
| |
* | wayland: calculate a single, scaled DPI valueDaniel Eklöf2020-07-26-0/+2
|/ | | | | | | | | | | | Previously, we calculated the monitors horizontal and vertical PPI values. For font sizing, we used the vertical PPI value. It seems however, that using the diagonal PPI value, i.e. diagonal_px / diagonal_inch, gives more consistent results. This is still a PPI value, but since it is intended to be used as a FontConfig DPI value, name it 'dpi'.
* conf: bindings: allow several mappings for the same actionDaniel Eklöf2020-07-15-1/+1
| | | | | If the bindings has different pipe command associated with them, treat them as different actions.
* input: wip: initial support for piping scrollback/view to external toolsDaniel Eklöf2020-07-15-1/+1
|
* input: parse_key_binding: free key-codes list if 'bindings' is NULLDaniel Eklöf2020-07-15-0/+1
|
* conf: add definitions for pipe-{scrollback,view} bindingsDaniel Eklöf2020-07-15-0/+2
|
* wayland: read XCURSOR_{THEME,SIZE} in reload_xcursor themeDaniel Eklöf2020-07-10-5/+0
|
* seat: use separate 'enter' serials for keyboard and mouseDaniel Eklöf2020-07-09-1/+2
|
* multi-seat: improve handling of multiple (mouse) pointersDaniel Eklöf2020-07-09-2/+2
| | | | | | | | * xcursor always set for all pointers * xcursor sometimes not updated when it should be * mouse grabbed state wasn't per seat, but global (i.e. "does at least one seat enable mouse grabbing") * selection enabled state wasn't per seat
* xcursor: trigger theme reload in pointer-enter eventDaniel Eklöf2020-07-08-0/+3
| | | | | | | | | | | | | | | | Previously, we triggered a theme reload on output changes. This is completely wrong. We may get a new output with a scale different from the output the pointer is actually on. Now, we store the current scale along with the theme. We then trigger a call to reload the xcursor theme *every* time the pointer enters a surface. When it does, we use the current scale factor of the terminal that owns that surface. If the terminal covers multiple outputs, with different scale factors, we'll use the largest scale factor. This may not be 100% correct. But to fix that, we'd need to track which regions of a surface are mapped on which outputs. Too complicated I say.
* multi-seat: enable xcursor theme support againDaniel Eklöf2020-07-08-1/+3
|
* wip: multi-seat supportDaniel Eklöf2020-07-08-138/+146
| | | | | Compiles and runs, but mouse, clipboard and other things have been disabled.
* wayland: use xdg_output's description if there's no 'model'Daniel Eklöf2020-06-25-1/+6
|
* wayland: handle outputs disappearingDaniel Eklöf2020-04-27-0/+1
| | | | | | | | | That is, deal with monitors being unplugged. At least on Sway 1.4, surfaces are not unmapped before the output is removed. Thus, in addition to free:ing the monitor resources, we also need to update all terminals that are mapped on this output - remove the output from their "mapped on" list.
* render: use output's subpixel mode when rasterizing glyphsDaniel Eklöf2020-04-20-0/+1
|
* input: slow trackpad scrolling now eventually scroll a lineDaniel Eklöf2020-04-10-0/+1
| | | | | | | | | | | | | | | Before, we converted each axis event's scroll amount to an integer and scrolled that many lines. However, axis events are speed sensitive - very slow scrolling will result in events with a scroll amount that is < 1.0. For us, this meant we never scrolled a single line. You could slow scroll all day if you wanted, and still we would never scroll a single line. Fix this by aggregating the scroll amount from axis events until the scroll amount is > 1.0, and then scroll.
* search: replace hard-coded key bindings with "user configurable" onesDaniel Eklöf2020-03-18-12/+43
| | | | | | | | They aren't really user configurable. At least not yet. However, with this, we now handle raw key codes just like the normal key bindings. Meaning, e.g. ctrl+g, ctrl+a, ctrl+e etc now works while searching with e.g. a russian layout.
* input: bind key bindings to raw key codes tooDaniel Eklöf2020-03-18-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Before, when looking for a matching user key binding, we only matched *symbols*. This means that the physical keys that generate a specific key binding is layout dependent. What's worse, it may not even be possible to generate the key binding at all. Russian is one such layout, where all the "normal" (us) symbols are replaced. By using raw key codes, we can get around this - the key code has a direct mapping to the physical key. However, matching raw key codes **only** doesn't always make sense either. For now, match **both** symbols _and_ key codes. Symbols take precedence. TODO: we might have to make this configurable _per binding_. Note: 'search' mode still uses mostly hardcoded shortcuts that still have this problem (i.e. ctrl+g doesn't work with a russian layout).
* wayland: store display FD in wayland structDaniel Eklöf2020-03-15-0/+3
| | | | | | | | This way we: * Don't have to call wl_display_get_fd() all the time * No longer call fdm_del_no_close() even though the FD hasn't been added to the FDM.
* Merge branch 'scale-fonts-using-logical-dpi-plus-scale-factor'Daniel Eklöf2020-03-13-6/+31
|\
| * term: use logical DPI+scale factor when scaling fontsDaniel Eklöf2020-03-11-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where the fonts were rendered too small when the output had fractional scaling. For integral scaling, using the logical (scaled) DPI multiplied with the scaling factor results in the same final DPI value as if we had used the physical DPI. But for fractional scaling, this works around the fact that the compositor downscales the surface after we've rendered it. Closes #5
* | config: mouse-bindings: verify button isn't already mappedDaniel Eklöf2020-03-12-0/+1
| | | | | | | | | | | | | | | | | | A button may only be mapped to a single action. Detect when the user tried to map the same button to multiple actions and error out. To clear a binding (for example, to free up a button from the default bindings), one can set the action it is bound to to `NONE` (e.g. `primary-paste=NONE`).
* | config/input: implement mouse bindingsDaniel Eklöf2020-03-12-0/+6
| | | | | | | | | | | | | | | | | | | | * New config section, "mouse-bindings", where bindings are defined on the form "action=BTN_<name> * pointer_button() handler now scans the bindings list instead of hardcoding primary-paste to BTN_MIDDLE. * The implementation handles single- double- and triple clicks in the bindings, but there is currently no way to define anything but a single-click binding in the configuration.
* | bindings: add minimize/maximize/fullscreen actionsDaniel Eklöf2020-03-12-0/+3
| | | | | | | | These actions are by default not bound to anything.
* | search: add support for user configurable key bindingsDaniel Eklöf2020-03-08-0/+1
| | | | | | | | No default bindings defined yet, though.
* | input: convert the rest of the normal key bindings to configurable bindingsDaniel Eklöf2020-03-08-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New actions defined and implemented: * scrollback up/down * font size up/down/reset * spawn terminal Break out key combo parsing to a new function, parse_key_binding_for_action(). This function parses a string containing one or more space separated key combo definitions on the form (mod1+mod2+...+key), where key is a XKB key name (e.g. KP_Add). Convert all hardcoded key bindings to configuration based bindings. These still cannot actually be configured by the user, but at least lives in the conf struct.
* | wip: initial framework for dealing with key/mouse bindings in different modesDaniel Eklöf2020-03-08-0/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial support for defining key and mouse bindings that are applied in different terminal modes/states. For example, there are two arrays dealing with key and mouse bindings in the "normal" mode. Most bindings will go here. There's also an array for "search" mode. These bindings will be used when the user has started a scrollback search. In the future, there may be a model selection mode as well. Or maybe "search" and "modal selection" will be combined into a single "keyboard" mode. We'll see. Since the keyboard bindings depend on the current XKB keymap, translation from the user specified key combination string cannot be done when loading the configuration, but must be done when we've received a keymap from the wayland server. We should explore if it's possible to load some kind of default keymap just to be able to verify the validity of the key combination strings at configuration load time, to be able to reject the configuration at startup. A couple of key bindings have been added as proof of concept. Mouse bindings aren't handled at all yet, and is likely to be re-written. For example, we can probably translate the configuration strings at configuration load time.
* csd: initial implementation of minimize/maximize/close buttonsDaniel Eklöf2020-03-02-2/+5
|
* config: make CSD user configurableDaniel Eklöf2020-03-02-9/+0
| | | | | | | | | | | | | | The user can now configure the following: * Whether to prefer CSDs or SSDs. But note that this is only a hint to the compositor - it may deny our request. Furthermore, not all compositors implement the decoration manager protocol, meaning CSDs will be used regardless of the user configuration (GNOME/mutter being the most prominent one). * Title bar size and color, including transparency * Border size and color, including transparency Also drop support for rendering the CSDs inside the main surface.
* render: csd: split up positioning from renderingDaniel Eklöf2020-02-29-0/+9
|
* input: cleanupDaniel Eklöf2020-02-29-2/+2
|
* input: csd: add a small delay before initiating a moveDaniel Eklöf2020-02-29-0/+3
| | | | | This ensures the user has time to double-click to toggle the maximized state.
* wayland: remove all usages of wayl_terminal_from_surface()Daniel Eklöf2020-02-29-3/+0
| | | | Use the 'user data' pointer from the wayland surface instead.
* input: handle CSD border corners correctlyDaniel Eklöf2020-02-29-0/+1
| | | | That is, change to correct cursor, and do resize correctly.
* wayland: once again switch to positioning CSDs outside the main surfaceDaniel Eklöf2020-02-26-1/+1
|
* wayland: document what FOOT_CSD_OUTSIDE doesDaniel Eklöf2020-02-26-0/+5
|
* wayland: switch back to positioning CSDs inside the main surfaceDaniel Eklöf2020-02-26-1/+1
|
* wayland: track window maximized stateDaniel Eklöf2020-02-26-0/+2
|
* csd: don't draw CSDs in fullscreen modeDaniel Eklöf2020-02-26-0/+2
|
* csd: position CSD sub-surfaces *outside* the main windowDaniel Eklöf2020-02-26-1/+2
| | | | | | | | | | | | | | | For now, this behavior is controlled with an ifdef. At least kwin seems very buggy when the decorations are positioned like this (but normally you'd use server-side decorations with kwin anyway). This commit also changes 'use_csd' to be a tri-state variable; when instantiating a window it is set to 'unknown'. If there's no decoration manager available (e.g. weston), we immediately set it to 'yes' (use CSDs). Otherwise, we wait for the decoration manager callback to indicate whether we should use CSDs or not.
* render: make CSD border and title size globally accessibleDaniel Eklöf2020-02-25-0/+3
|
* csd: wip: something to get started...Daniel Eklöf2020-02-23-0/+7
|
* render: throttle xcursor updatesDaniel Eklöf2020-01-04-3/+3
| | | | | | | | | | | | | | | | | | | | | | | With a bad behaving client (e.g. 'less' with mouse support enabled), we can end up with a *lot* of xcursor updates (so much, that we flooded the wayland socket before we implemented a blocking wayl_flush()). Since there's little point in updating the cursor more than once per frame interval, use frame callbacks to throttle the updates. This works more or lesslike normal terminal refreshes: render_xcursor_set() stores the last terminal (window) that had (and updated) the cursor. The renderer's FDM hook checks if we have such a pending terminal set, and if so, tries to refresh the cursor. This is done by first checking if we're already waiting for a callback from a previous cursor update, and if so we do nothing; the callback will update the cursor for the next frame. If we're *not* already waiting for a callback, we update the cursor immediately.
* wayland: wl_display_flush() never blocksDaniel Eklöf2020-01-04-0/+1
| | | | | | | | | | | | | | | | | | | Since it doesn't block, we need to detect EAGAIN failures and ensure we actually flush everything. If we don't, we sooner or later end up in a wayland client library call that aborts due to the socket buffer being full. Ideally, we'd simply enable POLLOUT in the FDM. However, we cannot write *anything* to the wayland socket until we've actually managed to send everything. This means enabling POLLOUT in the FDM wont work since we may (*will*) end up trying to write more data to it before we've flushed it. So, add a wrapper function, wayl_flush(), that acts as a blocking variant of wl_display_flush(), by detecting EAGAIN failiures and calling poll() itself, on the wayland socket only, until all data has been sent.
* wayland: don't use wl_display_dispatch()Daniel Eklöf2020-01-03-0/+2
| | | | | | | | | | | | | | | | | | | | | | wl_display_dispatch() calls poll(), which is unnecessary since we already know the FD is readable. Use the more lower level wl_display_read_events() + wl_display_dispatch_pending(). These require wl_display_prepare_read() to have been called. The idea is to call wl_display_prepare_read() **before** calling poll(). Thus, we do this more or less last in wayl_init(), and at the **end** of the FDM handler. However, having taking this lock also means we no longer can call wl_display_roundtrip() directly (it will hang). So, add a wrapper, wayl_roundtrip(), that cancels the read intent, does the roundtrip, and then re-acquires the read intent.
* render: refresh: ensure window has been configuredDaniel Eklöf2020-01-03-0/+1
|
* wayland: window: apply all configure changes after acking the eventDaniel Eklöf2020-01-03-0/+6
|
* wayland: remove wayl_terminal_from_xdg_{surface,toplevel}Daniel Eklöf2020-01-03-4/+0
|
* wayland: window now keeps pointer to owning terminal, not waylandDaniel Eklöf2020-01-03-2/+2
|
* wayland: rename focused/moused to kbd_focus/mouse_focusDaniel Eklöf2020-01-02-2/+2
|
* wayland: only bind to 'presentation' interface if -p,--presentation-timingsDaniel Eklöf2019-12-31-1/+3
|
* wayland: optionally use the presentation time protocol to measure input lagDaniel Eklöf2019-12-31-1/+6
| | | | | | | | | | | | | | | | | | | This adds a flag, -p,--presentation-timings, that enables input lag measuring using the presentation time Wayland protocol. When enabled, we store a timestamp when we *send* a key to the slave. Then, when we commit a frame for rendering to the compositor, we request presentation feedback. We also store a timestamp for when the frame was committed. The 'presented' callback then looks at the input and commit timestamps, and compares it with the presented timestamp. The delay is logged at INFO when the delay was less than one frame interval, at WARN when it was one frame interval, and at ERR when it was two or more frame intervals. We also update statistic counters that we log when foot is shut down.
* wayland: include more output (monitor) details in the log outputDaniel Eklöf2019-12-05-0/+4
|
* fcft: use fcft instead of local copy of font.c/font.hDaniel Eklöf2019-12-01-1/+2
|
* wayland: track current xcursor, and don't update if sameDaniel Eklöf2019-11-30-0/+1
| | | | | | | | | | | | | | | We may have many windows open, which tries to update/change the xcursor at various points. Track which cursor is currently loaded, regardless of which window it was set by. If someone tries to load that very same xcursor again, simply skip it. One example is when we've moused over a window that does *not* have keyboard focus, and then the user clicks, or by some other mean gives that window keyboard focus. In many cases it will then try to set the same cursor again (most of the times, the cursor is the same regardless of keyboard focus, but not always).
* terminal: use the 'text' xcursor pointer whenever selection is possibleDaniel Eklöf2019-11-28-2/+1
|
* wayland: calculate output PPI (pixels-per-inch)Daniel Eklöf2019-11-26-0/+3
|
* terminal: call user-defined callback when destroying terminalDaniel Eklöf2019-11-01-1/+0
| | | | main uses this to get the exit code of the terminal.
* wayland: wayl_win_destroy(): unmap windows before destroyingDaniel Eklöf2019-11-01-0/+2
| | | | | | | | | This will trigger e.d. keyboard_leave() and wl_pointer_leave() events, which ensures there aren't any references to the destroyed window from the global wayland struct. Call wl_display_roundtrip() to trigger those events *before* we destroy the window.
* wayland: temporary: track last terminal's exit valueDaniel Eklöf2019-10-30-0/+1
|
* wayland: track multiple terminalsDaniel Eklöf2019-10-30-2/+1
| | | | | The wayland 'term' member is gone and replaced by a list, 'terms'. This list contains all currently running terminal (windows).
* wayland: move reload_cursor_theme() and update_cursor_surface() to waylandDaniel Eklöf2019-10-27-0/+4
|
* wayland: implement wayl_init()Daniel Eklöf2019-10-27-2/+4
| | | | Wayland instantiation is now done by the wayland backend, not in main.
* term: wayland struct is now not a part of the terminal structDaniel Eklöf2019-10-27-1/+0
| | | | | | We do however need access to it, so provide a pointer. The difference is that now we can have a *single* wayland instance, but multiple terminal instances.
* wayland: pull in sys/time.h, for 'struct timeval'Daniel Eklöf2019-10-27-0/+2
|
* wayland: change all wayland callbacks to take a wayland pointerDaniel Eklöf2019-10-27-3/+28
| | | | | Instead of passing the terminal to the wayland callbacks, pass a 'struct wayland' pointer.
* wayland: add back-pointer to terminalDaniel Eklöf2019-10-27-0/+4
| | | | | This can, in the future, be extended to e.g. a list, to support multiple windows.
* kbd: move into waylandDaniel Eklöf2019-10-27-4/+34
|
* wayland: move clipboard/primary structs into the wayland structDaniel Eklöf2019-10-27-0/+18
| | | | These are application global and very wayland specific