mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 07:09:11 +02:00
Release 1.0.2
- Fix Issue 1 as described in Bugs.md
This commit is contained in:
commit
c8e442f71a
7 changed files with 75 additions and 32 deletions
16
Bugs.md
16
Bugs.md
|
|
@ -10,3 +10,19 @@ submitted on the issue tracker, should any other forms of contact become
|
|||
available.
|
||||
|
||||
## Issues
|
||||
|
||||
### Issue 1
|
||||
|
||||
* Github issue number: N/A
|
||||
* Fixed: 1.0.2
|
||||
|
||||
This issue is a focussing bug when using anki in release 1.0.1 and earlier
|
||||
on arch linux systems.
|
||||
|
||||
Steps to reproduce:
|
||||
|
||||
* start anki
|
||||
* Click "Add" to add cards
|
||||
* enter text into the "Tags" field
|
||||
* if autocompletion of tags pops up, the keyboard will not enter further
|
||||
keystrokes into the text field
|
||||
|
|
|
|||
11
keybinding.c
11
keybinding.c
|
|
@ -9,11 +9,11 @@
|
|||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
|
||||
#include "keybinding.h"
|
||||
#include "message.h"
|
||||
|
|
@ -422,9 +422,9 @@ keybinding_workspace_fullscreen(struct cg_server *server) {
|
|||
|
||||
// Switch to a differerent virtual terminal
|
||||
static int
|
||||
keybinding_switch_vt(struct wlr_backend* backend, unsigned int vt) {
|
||||
keybinding_switch_vt(struct wlr_backend *backend, unsigned int vt) {
|
||||
if(wlr_backend_is_multi(backend)) {
|
||||
struct wlr_session* session = wlr_backend_get_session(backend);
|
||||
struct wlr_session *session = wlr_backend_get_session(backend);
|
||||
if(session) {
|
||||
wlr_session_change_vt(session, vt);
|
||||
}
|
||||
|
|
@ -581,7 +581,8 @@ keybinding_cycle_views(struct cg_server *server, bool reverse) {
|
|||
return;
|
||||
}
|
||||
|
||||
wlr_output_damage_add_box(curr_workspace->output->damage, &curr_workspace->focused_tile->tile);
|
||||
wlr_output_damage_add_box(curr_workspace->output->damage,
|
||||
&curr_workspace->focused_tile->tile);
|
||||
seat_set_focus(server->seat, new_view);
|
||||
/* Move the previous view to the end of the list unless we are focused on
|
||||
* the desktop*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
project('cagebreak', 'c',
|
||||
version: '1.0.0',
|
||||
version: '1.0.2',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
|
|
|
|||
18
seat.c
18
seat.c
|
|
@ -1089,22 +1089,26 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view) {
|
|||
}
|
||||
}
|
||||
|
||||
if(prev_view == view) {
|
||||
if(seat->seat->keyboard_state.focused_surface == view->wlr_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if CG_HAS_XWAYLAND
|
||||
if(view->type == CG_XWAYLAND_VIEW) {
|
||||
const struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
|
||||
if(view->type == CG_XWAYLAND_VIEW && !xwayland_view_should_manage(view)) {
|
||||
const struct cg_xwayland_view *xwayland_view =
|
||||
xwayland_view_from_view(view);
|
||||
if(!wlr_xwayland_or_surface_wants_focus(
|
||||
xwayland_view->xwayland_surface)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if(prev_view != NULL) {
|
||||
view_activate(prev_view, false);
|
||||
}
|
||||
|
||||
if(prev_view != NULL) {
|
||||
view_activate(prev_view, false);
|
||||
seat->focused_view = view;
|
||||
}
|
||||
|
||||
view_activate(view, true);
|
||||
|
|
@ -1123,7 +1127,5 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view) {
|
|||
NULL);
|
||||
}
|
||||
|
||||
seat->focused_view = view;
|
||||
|
||||
process_cursor_motion(seat, -1);
|
||||
}
|
||||
|
|
|
|||
2
server.h
2
server.h
|
|
@ -17,7 +17,7 @@ struct cg_server {
|
|||
struct wl_event_loop *event_loop;
|
||||
|
||||
struct cg_seat *seat;
|
||||
struct wlr_backend* backend;
|
||||
struct wlr_backend *backend;
|
||||
struct wlr_idle *idle;
|
||||
struct wlr_idle_inhibit_manager_v1 *idle_inhibit_v1;
|
||||
struct wl_listener new_idle_inhibitor_v1;
|
||||
|
|
|
|||
31
view.c
31
view.c
|
|
@ -15,21 +15,21 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
|
||||
#include "output.h"
|
||||
#include "seat.h"
|
||||
#include "server.h"
|
||||
#include "view.h"
|
||||
#include "workspace.h"
|
||||
#include "xdg_shell.h"
|
||||
#include "view.h"
|
||||
#if CG_HAS_XWAYLAND
|
||||
#include "xwayland.h"
|
||||
#endif
|
||||
|
||||
struct cg_view*
|
||||
struct cg_view *
|
||||
view_get_prev_view(struct cg_view *view) {
|
||||
struct cg_view *prev = NULL;
|
||||
|
||||
|
|
@ -230,10 +230,14 @@ view_unmap(struct cg_view *view) {
|
|||
#endif
|
||||
{
|
||||
if(view_is_visible(view)) {
|
||||
struct cg_view* prev = view_get_prev_view(view);
|
||||
struct cg_tile* view_tile = view_get_tile(view);
|
||||
wlr_output_damage_add_box(view_tile->workspace->output->damage, &view_tile->tile);
|
||||
if(seat_get_focus(view->workspace->server->seat) == view) {
|
||||
struct cg_view *prev = view_get_prev_view(view);
|
||||
struct cg_tile *view_tile = view_get_tile(view);
|
||||
wlr_output_damage_add_box(view_tile->workspace->output->damage,
|
||||
&view_tile->tile);
|
||||
if(view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == NULL ||
|
||||
view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == view->wlr_surface) {
|
||||
seat_set_focus(view->workspace->server->seat, prev);
|
||||
} else {
|
||||
view_tile->view = prev;
|
||||
|
|
@ -246,6 +250,13 @@ view_unmap(struct cg_view *view) {
|
|||
#if CG_HAS_XWAYLAND
|
||||
else {
|
||||
view_damage_whole(view);
|
||||
if(view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == NULL ||
|
||||
view->workspace->server->seat->seat->keyboard_state
|
||||
.focused_surface == view->wlr_surface) {
|
||||
seat_set_focus(view->workspace->server->seat,
|
||||
view->workspace->server->seat->focused_view);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -294,13 +305,15 @@ view_map(struct cg_view *view, struct wlr_surface *surface) {
|
|||
|
||||
void
|
||||
view_destroy(struct cg_view *view) {
|
||||
struct cg_output* curr_output = view->workspace->server->curr_output;
|
||||
struct cg_output *curr_output = view->workspace->server->curr_output;
|
||||
if(view->wlr_surface != NULL) {
|
||||
view_unmap(view);
|
||||
}
|
||||
|
||||
view->impl->destroy(view);
|
||||
view_activate(curr_output->workspaces[curr_output->curr_workspace]->focused_tile->view, true);
|
||||
view_activate(curr_output->workspaces[curr_output->curr_workspace]
|
||||
->focused_tile->view,
|
||||
true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
27
xwayland.c
27
xwayland.c
|
|
@ -11,8 +11,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/xwayland.h>
|
||||
#include <xcb/xproto.h>
|
||||
|
|
@ -77,24 +77,35 @@ maximize(struct cg_view *view, int width, int height) {
|
|||
struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
|
||||
struct cg_output *output = view->workspace->output;
|
||||
|
||||
struct wlr_box* box = wlr_output_layout_get_box(view->workspace->server->output_layout, view->workspace->output->wlr_output);
|
||||
struct wlr_xwayland_surface_size_hints *hints = xwayland_view->xwayland_surface->size_hints;
|
||||
struct wlr_box *box =
|
||||
wlr_output_layout_get_box(view->workspace->server->output_layout,
|
||||
view->workspace->output->wlr_output);
|
||||
struct wlr_xwayland_surface_size_hints *hints =
|
||||
xwayland_view->xwayland_surface->size_hints;
|
||||
|
||||
if(hints != NULL && hints->flags & PMaxSize) {
|
||||
if(width > hints->max_width) {
|
||||
wlr_output_damage_add_box(output->damage, &(struct wlr_box){.x=view->ox + box->x, .y = view->oy + box->y, .width = width, .height=height});
|
||||
wlr_output_damage_add_box(output->damage,
|
||||
&(struct wlr_box){.x = view->ox + box->x,
|
||||
.y = view->oy + box->y,
|
||||
.width = width,
|
||||
.height = height});
|
||||
width = hints->max_width;
|
||||
}
|
||||
|
||||
if(height > hints->max_height) {
|
||||
wlr_output_damage_add_box(output->damage, &(struct wlr_box){.x=view->ox + box->x, .y = view->oy + box->y, .width = width, .height=height});
|
||||
wlr_output_damage_add_box(output->damage,
|
||||
&(struct wlr_box){.x = view->ox + box->x,
|
||||
.y = view->oy + box->y,
|
||||
.width = width,
|
||||
.height = height});
|
||||
height = hints->max_height;
|
||||
}
|
||||
}
|
||||
|
||||
wlr_xwayland_surface_configure(
|
||||
xwayland_view->xwayland_surface, view->ox + box->x,
|
||||
view->oy + box->y, width, height);
|
||||
wlr_xwayland_surface_configure(xwayland_view->xwayland_surface,
|
||||
view->ox + box->x, view->oy + box->y, width,
|
||||
height);
|
||||
wlr_xwayland_surface_set_maximized(xwayland_view->xwayland_surface, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue