Commit graph

1780 commits

Author SHA1 Message Date
Vincent Vanlaer
74264d4f62 Rename roots_seat_cancel_transform 2018-02-08 13:13:33 +01:00
Vincent Vanlaer
84234b4311 Merge branch 'master' into cancel-grab 2018-02-08 13:07:39 +01:00
Drew DeVault
78dc0c7de1
Merge pull request #611 from DonOregano/fix-resize-freeze
Make pointer button release outside window still count down the button_count
2018-02-07 21:00:09 -05:00
emersion
e13b13ff1d
Merge pull request #612 from VincentVanlaer/fix-move-resize
Fix jitter when quickly resizing windows
2018-02-07 22:43:41 +01:00
Vincent Vanlaer
712665b83b Fix style error 2018-02-07 20:26:30 +01:00
Vincent Vanlaer
099c80e7d6 Fix jitter when quickly resizing windows
Surfaces and views get resized only on commit, therefore we may only
change the position of a window if there are no pending commits.
2018-02-07 18:36:08 +01:00
Lars Hagström
b181f793c3 Make pointer button release outside window still count down the button_count.
When double-clicking a maximized window title, so that the windows size is restored and the mouse pointer ends up _outside_ the window it becomes impossible to move windows.
The reason is that the button_count variable is not counted down if the mouse button is released outside the window, so the button_count remains incremented even after the button is released.
This patch adds a call to wlr_seat_pointer_notify_button if the mouse button is released outside the window.
(I am a complete noob to wlroots, so be kind...)
2018-02-07 17:42:31 +01:00
Drew DeVault
9d7a9fc9d4
Merge pull request #610 from Ongy/drm_reuse
prevents reuse of outdated wlr_output state
2018-02-06 19:14:16 -05:00
Vincent Vanlaer
90eb50d9aa Merge roots_seat_cancel_* into one function 2018-02-06 22:55:56 +01:00
Markus Ongyerth
08fda567d2 prevents reuse of outdated wlr_output state
On the drm output the wlr_drm_connector structs are reused.
This struct contains the wlr_output struct, which is reused as well.
The old code kept modes/edid and output state persistent over hotplug.
This nulls the relevant strings, reads newer edid data and removes old
modes on unplug.
2018-02-06 22:45:37 +01:00
Vincent Vanlaer
147e5c0f8f Refactor roots_cursor_press_button
Removed the button_count check when resizing/moving/rotating ends,
since all buttons presses are now properly tracked.
2018-02-06 13:57:03 +01:00
Vincent Vanlaer
6567a35903 Update seat pointer on meta move/resize/rotate
This will send the button pressed event to the client. This shouldn't
be a problem since sebsequent pointer movements are not sent to the
client. Thus the client will not for example start selecting text when
it is being resized using the compositor keybindigns.
2018-02-06 12:53:51 +01:00
Vincent Vanlaer
7ae8800a63 Cancel rootston move/resize/rotate on escape press 2018-02-06 12:36:38 +01:00
Vincent Vanlaer
7e3bb39d49 Always notify seat on button press
When the cursor is not over a view, wlr_seat_pointer_notify_button is
not called. However, this function does the bookkeeping of the pointer
state with regards to the number of pressed buttons. Because this
function also sends updates to the focused view, it has been moved
down, after the focus has been updated.
2018-02-06 12:36:04 +01:00
Drew DeVault
b10269e513
Merge pull request #607 from VincentVanlaer/cursor-bug
Prevent cursor from getting stuck at infinity
2018-02-04 22:56:20 -05:00
Vincent Vanlaer
8dcb2f2d6b Prevent cursor from getting stuck at infinity 2018-02-04 22:40:24 +01:00
emersion
d33a113f67
Merge pull request #606 from FabianGeiselhart/fix-typo
Fix typo in rootston config
2018-02-04 19:14:51 +01:00
Fabian Geiselhart
ee6cbe2efd
Comments should talk about colons not semicolons 2018-02-04 15:26:12 +01:00
Drew DeVault
86a404f2cd
Merge pull request #601 from emersion/output-modeset-enabled
backend/drm: update output enabled property on modeset
2018-02-02 17:33:02 -05:00
emersion
bb39277e97
backend/drm: update output enabled property on modeset 2018-02-02 22:28:08 +01:00
Drew DeVault
39d5e78d37 Fix typo in xcursor.h 2018-02-02 08:48:01 -05:00
Drew DeVault
8cf622f074 Improve xcursor docs 2018-02-01 20:30:32 -05:00
emersion
a43555d7f5
Merge pull request #598 from Ongy/screenshot_transform
Screenshot transform
2018-02-01 21:41:15 +01:00
Markus Ongyerth
cd925f496c fixes the off by one errors in examples/screenshot
The inverse loop iterations for the transformed outputs had an off by
one error, iterating 1 based, not 0 based. This commit fixes that.
2018-02-01 21:36:14 +01:00
emersion
42ec696b82
Merge pull request #599 from emersion/output-cursor-destroy-signal
output: add destroy signal for wlr_output_cursor
2018-02-01 15:04:54 +01:00
emersion
8eed857292
output: add destroy signal for wlr_output_cursor 2018-02-01 12:08:35 +01:00
Markus Ongyerth
3a404e4f8d handle the other transformations for screenshots
This handles all current transformations for outputs properly.
This ensures an output is drawn in readable orientation/flipping no
matter the actual transformations applied to it.
2018-01-31 16:05:33 +01:00
Markus Ongyerth
4afc933ea4 fixes 90 degree rotation screenshots
This fixes the screenshot example application when an output is rotated
by 90 degrees.
Other tranformations are not taken into account yet.
2018-01-31 12:54:57 +01:00
emersion
429f06d3f1
Merge pull request #597 from agx/typos
Fix some typos
2018-01-30 18:14:46 +01:00
Guido Günther
c5aac77692 Fix some typos
Prefer initialize over initialise since used more often in the sources.
2018-01-30 16:10:07 +01:00
emersion
f152fdb4c5
Merge pull request #594 from Ongy/drm-surface-buffers
relases gbm buffers on init
2018-01-30 11:04:01 +01:00
Tony Crisci
ed5b1fdedd
Merge pull request #580 from emersion/screenshooter-renderer-backport
Backport screenshooter fixes from the renderer redesign v1
2018-01-29 17:13:23 -05:00
Markus Ongyerth
cde0f454b3 Clean up the gbm/egl as well 2018-01-29 11:49:31 +01:00
Markus Ongyerth
2cdb646531 relases gbm buffers on init
The wlr_drm_surface_init function is called (upon others) when the drm
mode is changed.
When the surface was used previously this replaced the gbm_surface, but
did not replace the gbm buffers (front/back).
With this, wlr_drm_surface_get_from never set up the new buffers with
the new glViewport because surf->front existed.

This frees the buffers to get new buffers on the new surface with the
new viewport.
2018-01-29 11:29:54 +01:00
Drew DeVault
60b2d969e0
Merge pull request #591 from emersion/fix-data-source-notify-finish
Fix assertion failed in data_source_notify_finish
2018-01-28 15:54:21 -05:00
emersion
5bbff20b8d
Fix assertion failed in data_source_notify_finish 2018-01-28 21:48:05 +01:00
Drew DeVault
f0b3a71fbc
Merge pull request #590 from pks-t/pks/rootston-wo-xwayland
Fix building rootston without XWayland
2018-01-28 15:05:31 -05:00
Patrick Steinhardt
41ec686693 meson: add systemd/elogind backends only if enabled
Right now, we are adding systemd and elogind backends to the build
system as soon as their libraries are found on the build system.
Instead, we should only add them if the libraries have been found _and_
the user has actually requested them to be included.
2018-01-28 16:14:38 +00:00
Patrick Steinhardt
91c034d164 travis: add job building wlroots without various options
Recently, the support for building rootston without XWayland was broken.
While the breakage was easily fixable, the more important problem is
that actually nobody seems to ever compile wlroots without XWayland,
causing silent breakage. This problem can easily be handled by the CI
system: in addition to the existing job which enables XWayland, add a
second job which compiles wlroots without XWayland. This will catch
breakage at a much earlier stage.

Catching broken builds without XWayland support obviously only covers
one part of a greater issue, as all the other options may cause our
builds to break, too. While we cannot test each combination, we can at
least make sure to have one build with all options enabled and one with
all options disabled.
2018-01-28 16:14:38 +00:00
Patrick Steinhardt
d05143950b rootston: move together XWayland setup code
The XWayland code for creating the cursor as well as creating the
surface itself are currently split up into two ifdef'ed sections in
`desktop_create()`. Move together these two sections in order to avoid
having multiple ifdefs as well as making it clearer that they do in fact
serve the same purpose of setting up the XWayland environment.
2018-01-28 12:12:33 +00:00
Patrick Steinhardt
52cb19d99d rootston: fix compilation without XWayland support
In case wlroots is not being compiled with XWayland support, we will not
have an xwayland surface in our roots view. While we make sure to pay
attention to that in some places, we are not being consistent and try to
access the xwayland surface in other places. Obviously, this leads to a
compiler error due to the field not being present.

Fix the issue by sprinkling in a few additional ifdefs where required.
2018-01-28 12:07:15 +00:00
Drew DeVault
facc5ef93a
Merge pull request #588 from agx/arm
Fix warnings on arm-linux
2018-01-27 14:14:12 -05:00
Guido Günther
d7dfbd23fa drm: Use ptrdiff_t instead of intmax_t in format string
since we're looking at pointer differences.

Otherwise the build fails on arm like

In file included from ../backend/drm/drm.c:19:0:
../include/wlr/util/log.h:34:17: error: format '%jd' expects argument of type 'intmax_t', but argument 7 has type 'int' [-Werror=format=]
  _wlr_log(verb, "[%s:%d] " fmt, _strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                 ^
../backend/drm/drm.c:462:2: note: in expansion of macro 'wlr_log'
  wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name,
  ^~~~~~~
../backend/drm/drm.c:462:39: note: format string is defined here
  wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name,
                                     ~~^
                                     %d
2018-01-27 12:29:56 +01:00
Guido Günther
1633b8d793 wlr_keyboard: use correct printf format string for keymap_size
keymap_size is a size_t. Otherwise the build fails on arm like

../types/wlr_keyboard.c: In function 'wlr_keyboard_set_keymap':
../include/wlr/util/log.h:34:17: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
  _wlr_log(verb, "[%s:%d] " fmt, _strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                 ^
../types/wlr_keyboard.c:218:3: note: in expansion of macro 'wlr_log'
   wlr_log(L_ERROR, "creating a keymap file for %lu bytes failed", kb->keymap_size);
   ^~~~~~~
../types/wlr_keyboard.c:218:50: note: format string is defined here
   wlr_log(L_ERROR, "creating a keymap file for %lu bytes failed", kb->keymap_size);
                                                ~~^
                                                %u
2018-01-27 12:23:26 +01:00
emersion
f34a1b75eb
render/gles2: use format bpp when reading pixels 2018-01-26 23:13:41 +01:00
emersion
174d1aa81b
Merge pull request #585 from agx/meson
meson: add tags and ctags targets
2018-01-26 17:04:30 +01:00
Guido Günther
e5dacbae5d meson: add ctags and etags targets
to create tag files. Idea taken from systemd.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2018-01-26 17:00:43 +01:00
Drew DeVault
ab738256ac Remove vim stuff from .gitignore
If this affects you put this in your vimrc:

set backupdir=~/.cache
set directory=~/.cache
2018-01-26 10:06:07 -05:00
Drew DeVault
a0351fb5d7
Merge pull request #584 from VincentVanlaer/drm-segfault
Clean up session signal handler on drm init fail
2018-01-24 15:39:47 -05:00
emersion
4dd214c0d3
Merge pull request #583 from agx/meson
meson: print enabled options
2018-01-24 18:40:05 +01:00