aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/backend.c
AgeCommit message (Collapse)Author
2018-03-28Merge pull request #765 from swaywm/transformed-eventsemersion
Use libinput transformed events instead of width_mm/height_mm
2018-03-28Remove width_mm from wlr_pointer eventsDrew DeVault
2018-03-28backend/x11: make xcb-xkb optional, remove global stateemersion
2018-03-28backend/x11: correctly update keyboard modifiersemersion
2018-03-26Fix use-after-free in x11 backend during shutdownUli Schlachter
The xcb_connection_t instance that is used here comes from XGetXCBConnection(), is created by XOpenDisplay(), and is owned by the returned Display*. Calling xcb_disconnect() directly on it leads to various use-after-frees during shutdown, as reported by valgrind. The first one of the about 30 errors is: Invalid read of size 4 at 0x71F2051: xcb_take_socket (in /usr/lib64/libxcb.so.1.1.0) by 0x78551DD: ??? (in /usr/lib64/libX11.so.6.3.0) by 0x7855A14: _XFlush (in /usr/lib64/libX11.so.6.3.0) by 0x7858504: _XGetRequest (in /usr/lib64/libX11.so.6.3.0) by 0x7838966: XFreeGC (in /usr/lib64/libX11.so.6.3.0) by 0x783238B: XCloseDisplay (in /usr/lib64/libX11.so.6.3.0) by 0x4E680C2: wlr_x11_backend_destroy (backend.c:333) by 0x4E57E94: wlr_backend_destroy (backend.c:39) by 0x4E629FB: multi_backend_destroy (backend.c:47) by 0x4E62B5A: handle_display_destroy (backend.c:90) by 0x50B7E9F: ??? (in /usr/lib64/libwayland-server.so.0.1.0) by 0x50B8476: wl_display_destroy (in /usr/lib64/libwayland-server.so.0.1.0) Address 0xc14dda0 is 0 bytes inside a block of size 21,152 free'd at 0x4C2DD18: free (vg_replace_malloc.c:530) by 0x4E680A5: wlr_x11_backend_destroy (backend.c:330) by 0x4E57E94: wlr_backend_destroy (backend.c:39) by 0x4E629FB: multi_backend_destroy (backend.c:47) by 0x4E62B5A: handle_display_destroy (backend.c:90) by 0x50B7E9F: ??? (in /usr/lib64/libwayland-server.so.0.1.0) by 0x50B8476: wl_display_destroy (in /usr/lib64/libwayland-server.so.0.1.0) by 0x40C54E: main (main.c:84) Block was alloc'd at at 0x4C2EA1E: calloc (vg_replace_malloc.c:711) by 0x71F0C60: xcb_connect_to_fd (in /usr/lib64/libxcb.so.1.1.0) by 0x71F4BD4: xcb_connect_to_display_with_auth_info (in /usr/lib64/libxcb.so.1.1.0) by 0x7854AA1: _XConnectXCB (in /usr/lib64/libX11.so.6.3.0) by 0x7845481: XOpenDisplay (in /usr/lib64/libX11.so.6.3.0) by 0x4E681B6: wlr_x11_backend_create (backend.c:376) by 0x4E580EE: wlr_backend_autocreate (backend.c:99) by 0x40C27D: main (main.c:35) Normally, one would expect this to crash during XCloseDisplay() when xcb_disconnect() is called again and frees the same data again (glibc would detect a double free). However, XCloseDisplay() tries to clean up some internal caches first for which it has to send requests to the X11 server (e.g. the XFreeGC() above). This fails since the file descriptor was already closed, which causes an IO error. Xlib's _XDefaultIOError() handles this by printing an error message and calling exit(1). Thus, the only symptom of this problem was compositors exiting mid-shutdown and printing an error message: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" after 6 requests (6 known processed) with 0 events remaining. Fixes: https://github.com/swaywm/wlroots/issues/745 Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-03-22x11 backend: fix various leaksDominique Martinet
- xcb_query_pointer_reply return value needs to be freed - call XCloseDisplay - remove wl event_source
2018-03-06Add const to x11 and input interfacesScott Anderson
2018-03-06Use xcb atoms properlyScott Anderson
2018-02-23x11: parse vendor and model out of xcb setup informationGuido Günther
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-18Merge pull request #647 from ascent12/elf_visibilityDrew DeVault
ELF Visibility
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-18x11 backend: set window titleGuido Günther
This makes windows identifiable in the window list
2018-02-12Reformat all #include directivesemersion
2018-02-12Make wlr_signal_emit_safe privateemersion
2018-02-12Remove wlr_backend.events.{output_remove,device_remove}emersion
2018-02-12Add wlr_signal_emit_safeemersion
2018-02-09Swap buffers with damageemersion
2018-01-30backend: fix use-after-free when destroying backendsemersion
The backend destroy signal is emitted before the output_remove signal is. When the destroy signal is emitted listeners remove their output_remove listener, so the output_remove signal is never received and listeners have an invalid output pointer. The correct way to solve this would be to remove the output_remove signal completely and use the wlr_output.events.destroy signal instead. This isn't yet possible because wl_signal_emit is unsafe and listeners cannot be removed in listeners.
2018-01-29Merge remote-tracking branch 'upstream/master' into output-damageemersion
2018-01-26output: add wlr_output_schedule_frameemersion
2018-01-23Backport screenshooter fixes from the renderer redesign v1emersion
This backports some changes to #319 to fix the screenshooter data format. This also adds wlr_backend_get_renderer which will be useful to support multiple renderers.
2018-01-21output: add damage tracking via buffer ageemersion
2018-01-20backend/x11: force rendering the whole outputemersion
2018-01-04Add wlr_output::enabledemersion
2017-12-19x11 backend: add wlr_input_device_is_x11Dominique Martinet
2017-12-19x11 backend: add wlr_output_is_x11Dominique Martinet
2017-12-18add some input device cleanup to x11 backendTony Crisci
2017-12-17Refactor wlr_egl_init to accept config_attribsemersion
2017-12-17Add full refresh rate support to custom modesemersion
2017-12-14Merge branch 'master' into display-destroyemersion
2017-12-12Update output layout when scale or transform changesemersion
2017-12-11Merge branch 'master' into display-destroyemersion
2017-12-11Add wlr_output_set_custom_modeemersion
2017-12-08Listen to display destroy in xwayland, rename wlr_egl_freeemersion
2017-12-07Listen to display destroy in backendsemersion
2017-11-16Terminate local display on remote X11 server erroremersion
2017-10-31Destroy x11 output with backendemersion
2017-10-30bug: free x11 backend output in destroyTony Crisci
2017-10-30remove time usecTony Crisci
2017-10-30refactor input time_sec to time_msecTony Crisci
2017-10-23Send output current mode when changedemersion
2017-10-22Add pointer to backend inside wlr_outputScott Anderson
2017-10-22Move egl.h to render/egl.hScott Anderson
2017-10-14Fix duplicated pointer axis eventsD.B
In pointer.c, some axis event was emitted even if the event pointer did not have current axis. In X11 backend pointer scroll events seem to be composed of both BUTTON_PRESS and BUTTON_RELEASE. Therefore we should skip one of them (RELEASE) to avoid event duplication.
2017-10-11Add FreeBSD compatibilityGreg V
2017-10-08Merge pull request #240 from acrisci/feature/x11-backend-axisDrew DeVault
x11-backend: axis events
2017-10-08x11-backend: create wlr output globalTony Crisci
2017-10-08x11-backend: axis eventsTony Crisci
2017-10-07Merge branch 'master' into feature/xdg-popupTony Crisci