Skip to content

Commit

Permalink
Don't use a reference to store the cursor
Browse files Browse the repository at this point in the history
I'm a little stupid
  • Loading branch information
serebit committed Oct 21, 2023
1 parent e26dfa8 commit 29fbbcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/input/seat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void request_set_selection_notify(wl_listener* listener, void* data) {
* pointer, touch, and drawing tablet device. We also rig up a listener to
* let us know when new input devices are available on the backend.
*/
Seat::Seat(Server& server) noexcept : listeners(*this), server(server), cursor(*(new Cursor(*this))) {
Seat::Seat(Server& server) noexcept : listeners(*this), server(server), cursor(*this) {
seat = wlr_seat_create(server.display, "seat0");

listeners.new_input.notify = new_input_notify;
Expand Down
3 changes: 2 additions & 1 deletion src/input/seat.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef MAGPIE_SEAT_HPP
#define MAGPIE_SEAT_HPP

#include "cursor.hpp"
#include "types.hpp"

#include <vector>
Expand Down Expand Up @@ -29,7 +30,7 @@ class Seat {
public:
Server& server;
wlr_seat* seat;
Cursor& cursor;
Cursor cursor;
std::vector<Keyboard*> keyboards;
wlr_virtual_pointer_manager_v1* virtual_pointer_mgr;
wlr_virtual_keyboard_manager_v1* virtual_keyboard_mgr;
Expand Down

0 comments on commit 29fbbcd

Please sign in to comment.