Re: [i3] egde snapping for floating windows

  • From: Jan Krcmar <honza801@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Fri, 22 Apr 2011 15:28:17 +0200

hi again,

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

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. ;)

void randr_init(int *event_base) {
const xcb_query_extension_reply_t *extreply;

extreply = xcb_get_extension_data(conn, &xcb_randr_id);
if (!extreply->present) {
disable_randr(conn);
return;
}

randr_query_outputs();

if (event_base != NULL)
*event_base = extreply->first_event;

xcb_randr_select_input(conn, root,
XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE |
XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE |
XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE |
XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY);

xcb_flush(conn);
}

hope this helped...

regards
fous


2011/4/22 Jan Krcmar <honza801@xxxxxxxxx>:

hi,
made your wishes come true

04/22/2011 10:44:23 AM - main.c: ev_io_start ipc_io
04/22/2011 10:44:23 AM - main.c: ev_io_start xcb_watcher
i3: ev.c:2621: ev_io_start: Assertion `("libev: ev_io_start called
with negative fd", fd >= 0)' failed.
Aborted

so the problem is in theese lines of main.c

ev_io_init(xcb_watcher, xcb_got_event, xcb_get_file_descriptor(conn),
EV_READ);
LOG("main.c: ev_io_start xcb_watcher\n");
ev_io_start(loop, xcb_watcher);

do you need any additional informations?
btw, i'm trying to run i3 in the Xnest, could this be the problem?

regards
fous

2011/4/22 Fernando Lemos <fernandotcl@xxxxxxxxx>:
Hi,

On Thu, Apr 21, 2011 at 10:49 AM, Jan Krcmar <honza801@xxxxxxxxx> wrote:
finally i've got some time to spend with i3
the 'tree' branch compiles, but

i3: ev.c:2621: ev_io_start: Assertion `("libev: ev_io_start called
with negative fd", fd >= 0)' failed.

I haven't really looked at the patch (thanks anyways, it's always
appreciated), but can you reproduce it with the current -tree? If so,
could you please add a printf (or DLOG or whatever) above each call to
ev_io_start (3 in main.c, 1 in ipc.c) and file a bug report?

Thanks,



Other related posts: