Re: [i3] egde snapping for floating windows

  • From: Fernando Lemos <fernandotcl@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Fri, 22 Apr 2011 15:29:34 -0300

Hi,

On Fri, Apr 22, 2011 at 10:28 AM, Jan Krcmar <honza801@xxxxxxxxx> wrote:

the problem was in the Xnest, running it on vt works good, but...

Thanks for the info. I can reproduce that one, xcb_get_file_descriptor
is returning -1 in Xnest. The docs for xcb_get_file_descriptor say:

"Accessor for the file descriptor that was passed to the
xcb_connect_to_fd call that returned c. "

The way I see it, we it doesn't guarantee we'll get a descriptor
unless we used xcb_connect_to_fd instead of xcb_connect, but it seems
natural that xcb_connect would call xcb_connect_to_fd. I wouldn't be
surprised if this was just a bug in XCB or Xnest. Xnest is kinda dead
these days, isn't it? I think Xephyr is the new "de facto" X within X,
and i3-tree does work in Xephyr.

the second problem is in the randr extension.
in src/randr.c: void randr_init function breaks the file descriptor of
the xcb via xcb_randr_select_input function

i think that all the xrandr functions shouldn't be called if the
xrandr extension is missing. anyway the debug log says "Checking for
XRandR..." but it does not check anythink, it just calls the randr
functions.

so, here is my patched rand_init function, it is definetly NOT a good
workaround, but it works. ;)

It looks correct to me, I don't see why we would want to be notified
about RandR events if we don't support them. But then again I don't
know anything about RandR.

Regards,

Other related posts: