aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
AgeCommit message (Collapse)Author
2019-06-17x11: Send a frame event on the pointer after button eventsDorota Czaplejewicz
Without the immediate frame event, the button event would not be processed in time: https://source.puri.sm/Librem5/phoc/issues/
2019-06-16output: remove wlr_output_impl.transformSimon Ser
The backend doesn't need to handle transform changes, since everything is done in software. In fact, all of the implementations were all identical and just set the transform. We could add support for hardware transforms, but: - This would require a different field (something like hardware_transform) - Not all combinations are possible because there often are hardware limitations - The Wayland protocol isn't ready for this (in particular xdg-output, see [1]) This belongs to a different patch series anyway. [1]: https://patchwork.freedesktop.org/series/52324/
2019-04-23output: rename needs_commit to needs_frameSimon Ser
This new name makes more sense, since it is a request from the backend to get a new frame. In the future a commit may not convey a new frame.
2019-04-23output: refactor backend APISimon Ser
This updates the backend part of the output API. This is mostly renaming: make_current becomes attach_render and swap_buffers becomes commit. This also fixes the RDP backend to support NULL damage.
2019-04-08backend: unbreak on 32-bit architecturesJan Beich
backend/headless/output.c:132:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/noop/output.c:72:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/wayland/output.c:294:3: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++backend->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~~~~~ backend/x11/output.c:150:3: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] ++x11->last_output_num); ^~~~~~~~~~~~~~~~~~~~~~
2019-03-15backend/x11: improve output number handlingBrian Ashworth
This improves the way the output numbers are handled for the x11 backend. Instead of using the number of active outputs plus one, the last used number is stored and new outputs will increment it. This fixes the situation where you start with one output, create a second, close the first, and create a third. Without this, both outputs will be X11-2, which causes an issue since the identifier will also be identical. With this, the last output is X11-3 and the outputs can be distinguished.
2019-01-26pointer: add a frame eventemersion
Frame events group logically connected pointer events. It makes sense to make the backend responsible for sending frame events, since once the events are split (ie. once the frame events are stripped) it's not easy to figure out which events belongs to which frame again. This is also how Weston handles frame events. Fixes https://github.com/swaywm/wlroots/issues/1468
2019-01-24backend/x11 & backend/wayland: make set_title NULL-safeJente Hidskes
Set the default "wlroots - " title when the title argument to the set_title functions is NULL. Otherwise, for at least the Wayland backend, we'd crash because xdg_toplevel_set_title doesn't handle a NULL pointer.
2019-01-20Add wlr_x11_output_set_titleJente Hidskes
2019-01-07Simplify evdev includes on FreeBSD by relying on up-to-date packageJan Beich
As evdev-proto is installed by CI some files have been missed: ../examples/pointer-constraints.c:2:10: fatal error: 'linux/input-event-codes.h' file not found #include <linux/input-event-codes.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../examples/relative-pointer-unstable-v1.c:5:10: fatal error: 'linux/input-event-codes.h' file not found #include <linux/input-event-codes.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-11-13backend/x11: Hide cursor with XfixesScott Anderson
2018-11-13backend/x11: Remove old input functionsScott Anderson
This also allows us to remove xcb-xkb, since Xinput will now give us the appropriate XKB modifiers with each event.
2018-11-13backend/x11: Add new Xinput eventsScott Anderson
2018-11-13backend/x11: Check for xinput extensionScott Anderson
2018-11-13backend/x11: Move atom initilisation earlierScott Anderson
There isn't any real reason to delay this until the backend is started.
2018-11-13backend/x11: Make header order consistentScott Anderson
2018-11-13backend/x11: Rename xcb_conn to xcbScott Anderson
When the Xlib connection is removed, this _conn suffix is going to be pointless. I'm removing this preemtively for that.
2018-11-12Use #if instead of #ifdef for wlroots config dataemersion
This prevents some annoying issues when e.g. not including wlr/config.h or making a typo in the guard name.
2018-11-10render: correctly set EGL_RENDERABLE_TYPEemersion
This should be set to EGL_OPENGL_ES2_BIT. Also fixes EGL config attributes in the headless and X11 backends.
2018-10-04output: add presentation refresh predictionemersion
2018-10-04output: send present event from all backendsemersion
2018-09-18backend/x11: add assertionsemersion
2018-09-02Free unused pointer in x11/backend.crandom human
2018-08-24Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""Scott Anderson
This reverts commit 9c886f20b97b6ab1ac85b849f1fe7f16eb199ff0.
2018-08-23Revert "Merge pull request #1194 from ascent12/meson_feature"Drew DeVault
This breaks wlroots when used as a meson subproject. This reverts commit dea311992eb4ff3e343c3cf5b0603034223d2a42, reversing changes made to 6db9c4b74667c1d917d720f5e96985a2461569fb.
2018-08-22Use new options for X11 backend and XwaylandScott Anderson
2018-08-10Fix xcb_create_window parameterssdilts
Set the window width and height, not the location of the window.
2018-08-09Add guard for changing the size of X11 backend windowssdilts
Events that set the window to either a width or height of zero are now ignored and logged.
2018-08-09Set default output size for X11 backendsdilts
Fixes issue #1170 Also set the created window size to match the output size.
2018-07-21Revert "Merge pull request #1153 from emersion/include-config"Drew DeVault
This reverts commit ef0a6ea4d2934ec014d791150c42348061ec4f7f, reversing changes made to 8d03bc9178d8544cbcd24293ece6ac9f1698e602.
2018-07-21Always include config.hemersion
2018-07-11x11: make sure event source is drainedGuido Günther
Otherwise running under Xvfb will not deliver any events. This results in e.g. weston-info reporting a 0x0 window size (which results in all sorts of problems).
2018-07-11x11: use correct type for events in wl_event_loop_add_fdGuido Günther
2018-07-11x11: Check if xcb_configure_window workedGuido Günther
So far we did not check for any errors
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-06-30x11 backend init: fix leak on failed XOpenDisplayDominique Martinet
Found through static analysis
2018-05-25backends: implement custom EGL and renderer initializationIlia Bozhinov
Compositors now have more control over how the backend creates its renderer. Currently all backends create an EGL/GLES2 renderer, so the necessary attributes for creating the context are passed to a user-provided callback function. It is responsible for initializing provided wlr_egl and to return a renderer. On fail, return 0. Fixes #987
2018-05-12Add support for discrete axis valuesemersion
2018-05-03backend/x11: don't transform pointer eventsGuido Günther
We do this in a backend independent way in wlr_cursor now.
2018-04-30backend/{wayland,x11}: fix pointer coords for transformed outputsemersion
2018-04-29backend/x11: add one pointer per outputemersion
2018-04-28backend/x11: correctly destroy input devicesemersion
2018-04-28backend/headless: remove useless destructoremersion
2018-04-26Merge pull request #902 from emersion/various-memory-leaksDrew DeVault
Various memory leaks
2018-04-25backend: destroy renderer when destroying backendemersion
2018-04-25Don't use the wlr_ prefix for static functionsemersion
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-24render/egl: add wlr_egl_destroy_surfaceemersion
2018-04-15x11 backend: Expose events mean "needs swap"Uli Schlachter
When the X11 server sends an expose event, that means that "this rectangle here (the event contains x,y,width,height) has undefined contents on your window; please redraw that". This means that we need a swap. However, so far the code does not actually enforce that a swap happens. For example, start rootston, switch to another workspace and then switch back. The rootston window will not be redrawn (before commit 52b058c2a31fb, it would just be fully white; after that commit it will show whatever was visible on the old workspace). This is because the drawing code concludes that nothing needs to be done. However, in fact a swap is necessary. This reverts commit e79d92458852373, because its optimisation is already done now: wlr_output_update_needs_swap() emits a signal, which is handled by wlr_output_damage with a call to wlr_output_schedule_frame(). This function does nothing if a frame is already pending. Thus, the optimisation from commit e79d92458852373 now happens implicitly. Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-04-15x11 backend: Ignore expose if frame is pendingUli Schlachter
When resizing rootston with the mouse, the result is really slow. One can see that rootston needs quite a while for drawing the newly visible area. This is because every single expose event is handled on its own and causes (apparently) a full repaint or at least a swap. This commit improves things by only causing a new frame if none is pending already. With this change, there is almost no delay in rootston drawing the newly visible area. Signed-off-by: Uli Schlachter <psychon@znc.in>