Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland support #2

Open
Safari77 opened this issue Jan 6, 2021 · 2 comments
Open

wayland support #2

Safari77 opened this issue Jan 6, 2021 · 2 comments

Comments

@Safari77
Copy link

Safari77 commented Jan 6, 2021

I use kmsgrab with wayland, but swcursor does not work so well with this combination.
Using gnome 3.38.2 with gtk-3.24.24 on Fedora 33.

(swcursor:963185): Gdk-WARNING **: 15:27:32.717: gdkwindow-x11.c:5650 drawable is not a native X11 window

Thread 1 "swcursor" received signal SIGSEGV, Segmentation fault.
0x00007ffff7e1f5ad in require_socket.part.0.lto_priv.0 (dpy=0x55555557f810) at xcb_io.c:66
66			if(dpy->xcb->event_owner != XlibOwnsEventQueue)
(gdb) bt
#0  0x00007ffff7e1f5ad in require_socket.part.0.lto_priv.0 (dpy=0x55555557f810) at xcb_io.c:66
#1  0x00007ffff7e223fd in require_socket (dpy=0x55555557f810) at xcb_io.c:579
#2  _XFlush (dpy=0x55555557f810) at xcb_io.c:576
#3  0x00007ffff7e2264d in _XGetRequest (dpy=0x55555557f810, type=<optimized out>, len=8) at XlibInt.c:1764
#4  0x00007ffff7e15f0f in XQueryExtension
    (dpy=0x55555557f810, name=0x7ffff7dd00e9 "SHAPE", major_opcode=0x7fffffffb754, first_event=0x7fffffffb758, first_error=0x7fffffffb75c) at QuExt.c:44
#5  0x00007ffff7e09e87 in XInitExtension (dpy=dpy@entry=0x55555557f810, name=name@entry=0x7ffff7dd00e9 "SHAPE") at InitExt.c:47
#6  0x00007ffff7dc758d in XextAddDisplay
    (extinfo=0x7ffff7dd5550 <_shape_info_data>, dpy=dpy@entry=0x55555557f810, ext_name=ext_name@entry=0x7ffff7dd00e9 "SHAPE", hooks=hooks@entry=
    0x7ffff7dd5200 <shape_extension_hooks>, nevents=nevents@entry=1, data=data@entry=0x0) at extutil.c:110
#7  0x00007ffff7dc7ee0 in find_display (dpy=0x55555557f810) at XShape.c:73
#8  0x00007ffff7dcb92c in XShapeCombineRegion (dpy=0x55555557f810, dest=0, destKind=2, xOff=0, yOff=0, r=0x55555558e3d0, op=0) at XShape.c:195
#9  0x0000555555557514 in swcursor_window_map (widget=0x5555558583b0) at swcursor-window.c:143
#10 0x00007ffff7061080 in _g_closure_invoke_va
    (param_types=0x0, n_params=<optimized out>, args=0x7fffffffba30, instance=0x5555558583b0, return_value=0x0, closure=0x5555555c3b90)
    at ../gobject/gclosure.c:873
#11 g_signal_emit_valist (instance=0x5555558583b0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffba30) at ../gobject/gsignal.c:3403
#12 0x00007ffff70611a3 in g_signal_emit (instance=instance@entry=0x5555558583b0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3550
#13 0x00007ffff79b9dd8 in gtk_widget_map (widget=0x5555558583b0) at gtkwidget.c:5047
#14 0x00007ffff79d96df in gtk_window_show (widget=0x5555558583b0) at gtkwindow.c:6185
#15 0x00007ffff7043e2a in g_closure_invoke
    (closure=0x5555555c3db0, return_value=0x0, n_param_values=1, param_values=0x7fffffffbce0, invocation_hint=0x7fffffffbc60) at ../gobject/gclosure.c:810
#16 0x00007ffff706cf0a in signal_emit_unlocked_R.isra.0
    (node=node@entry=0x5555555eb010, detail=detail@entry=0, instance=instance@entry=0x5555558583b0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffbce0) at ../gobject/gsignal.c:3668
#17 0x00007ffff7060f82 in g_signal_emit_valist
    (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffbe90) at ../gobject/gsignal.c:3494
#18 0x00007ffff70611a3 in g_signal_emit (instance=instance@entry=0x5555558583b0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3550
#19 0x00007ffff79ba476 in gtk_widget_show (widget=0x5555558583b0) at gtkwidget.c:4848
#20 0x0000555555556ac5 in show_main_window (image=0x5555555e8820) at swcursor.c:56
#21 0x0000555555556978 in main (argc=1, argv=0x7fffffffc0d8) at swcursor.c:29
@andykitchen
Copy link
Owner

Hi thanks,

Yeah this project doesn't currently support Wayland at all, AFAICT there is no GTK native way to do what swcursor does, so the best we can do is detect being running under Wayland and use a totally different code path. I don't currently use Wayland so this feature may take a while.

AK

@andykitchen
Copy link
Owner

On reflection this may be more tricky because Wayland doesn't have a simple way of getting the global location of the mouse cursor:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants