improvement on xdg request handles
This commit is contained in:
4
cursor.c
4
cursor.c
@@ -48,7 +48,6 @@ void diyac_reset_cursor_mode(struct diyac_server *server)
|
||||
/* Reset the cursor mode to passthrough. */
|
||||
server->seat.cursor_mode = DIYAC_CURSOR_PASSTHROUGH;
|
||||
server->grabbed_view = NULL;
|
||||
//struct diyac_view * view = diyac_view_at()
|
||||
}
|
||||
|
||||
static void process_cursor_move(struct diyac_server *server, uint32_t time)
|
||||
@@ -57,6 +56,9 @@ static void process_cursor_move(struct diyac_server *server, uint32_t time)
|
||||
struct diyac_view *toplevel = server->grabbed_view;
|
||||
if(toplevel->state != DIYAC_VIEW_NORMAL)
|
||||
{
|
||||
// cancel maximize or fullscreen state
|
||||
wlr_xdg_toplevel_set_maximized(toplevel->xdg_toplevel, false);
|
||||
wlr_xdg_toplevel_set_fullscreen(toplevel->xdg_toplevel, false);
|
||||
// move the windows to cursor
|
||||
server->grab_x = toplevel->original.width * server->grab_x / toplevel->output->usable_area.width;
|
||||
}
|
||||
|
Reference in New Issue
Block a user