platform/core/uifw/libds.git
13 months agoxdg_shell: Add null check for user data of xdg_surface_v6 83/299583/1 accepted/tizen/unified/20231006.044445
Seunghun Lee [Thu, 5 Oct 2023 07:50:39 +0000 (16:50 +0900)]
xdg_shell: Add null check for user data of xdg_surface_v6

The wl_resource_get_user_data() with xdg_surface_v6 resource can return
null if the associated wl_surface is already destroyed.

Change-Id: I7918d5284c9af6219ff67584b878d6e0c9bccf08

14 months agosubsurface: Add more log for debug 51/298751/1 accepted/tizen/8.0/unified/20231005.094156 accepted/tizen/unified/20230913.172621 tizen_8.0_m2_release
Seunghun Lee [Tue, 8 Aug 2023 07:25:15 +0000 (16:25 +0900)]
subsurface: Add more log for debug

Change-Id: Id65f232c674e01b4a0c41e03bc587f248439757b

14 months agoxdg_shell_v6: Add APIs for some necessary signal listener 34/298734/1
Seunghun Lee [Mon, 11 Sep 2023 08:18:18 +0000 (17:18 +0900)]
xdg_shell_v6: Add APIs for some necessary signal listener

Change-Id: I75ec09f68882313877e954c015ad2c4ce3560a2b

14 months agoxdg_shell_v6: Add missing WL_EXPORT 33/298733/1
Seunghun Lee [Mon, 11 Sep 2023 06:41:40 +0000 (15:41 +0900)]
xdg_shell_v6: Add missing WL_EXPORT

Change-Id: If864f2c0175934b7c4639b5dff2f3941db3cd169

14 months agoRemove log handler for wayland log 15/298715/1
Seunghun Lee [Tue, 12 Sep 2023 23:06:33 +0000 (08:06 +0900)]
Remove log handler for wayland log

The log handler in libds caused a crash of enlightenment where using
wayland-server APIs in multi threads. That's because the log handler
uses `static` array for keep a format string. Even though it could also
be resolved by removing the static variable, it just removes the log
handler for wayland log in libds so a compositor can configure it by
itself.

Change-Id: I1778fabec38c7cb9b922c8a17b119da387ceacfd

14 months agoAdd ds_single_pixel_buffer_manager_v1 35/298235/1 accepted/tizen/unified/20230904.165046
Seunghun Lee [Fri, 1 Sep 2023 08:38:56 +0000 (17:38 +0900)]
Add ds_single_pixel_buffer_manager_v1

This implements the single-pixel-buffer-v1 protocol [1], to allow
clients to create 1x1 buffers with a single color.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/104

Change-Id: I15da75b51762d7e0a2727d27ea3255ca8ab833cc

14 months agoxdg_shell_v6: Add zxdg_popup_v6 implementation 77/297877/1 accepted/tizen/unified/20230828.145929
Seunghun Lee [Wed, 23 Aug 2023 02:09:12 +0000 (11:09 +0900)]
xdg_shell_v6: Add zxdg_popup_v6 implementation

Change-Id: Ia5594fc42744b3d707837140bd82b2ee346f3d6d

14 months agoxdg_shell_v6: Add zxdg_positioner_v6 implementation 76/297876/1
Seunghun Lee [Tue, 22 Aug 2023 03:43:27 +0000 (12:43 +0900)]
xdg_shell_v6: Add zxdg_positioner_v6 implementation

Change-Id: I51e69eb47c86e032517f8cbafa8d010980592d70

15 months agoUse -fmacro-prefix-map to strip build path 77/296977/1 accepted/tizen/unified/20230822.162235
Seunghun Lee [Mon, 12 Jun 2023 23:57:20 +0000 (08:57 +0900)]
Use -fmacro-prefix-map to strip build path

This is taken from wlroots to strip the build-path dependent bytes
of each __FILE__ string used by ds_log and related functions.

Change-Id: I5660355f210615024bd4018cf63b6da216a128e8

15 months agosurface: Release buffer after commit event 26/296526/1 accepted/tizen/unified/20230808.170212
Seunghun Lee [Fri, 28 Jul 2023 05:08:41 +0000 (14:08 +0900)]
surface: Release buffer after commit event

A buffer has to be unlocked after commit event so that the buffer can be
released immediately when unlocked by a compositor.

Change-Id: If7383a2432baf90df39f1457e3a3edf3bfcbac74

15 months agobuild: Use -fvisibility 60/296460/1
Seunghun Lee [Wed, 19 Jul 2023 01:37:27 +0000 (10:37 +0900)]
build: Use -fvisibility

This makes all the exported symbols hidden by default.

Change-Id: I6f2b127da4e8f83d04e8d97eba7371bcb590542e

15 months agoAdd missing WL_EXPORT 59/296459/1
Seunghun Lee [Wed, 19 Jul 2023 00:33:30 +0000 (09:33 +0900)]
Add missing WL_EXPORT

Change-Id: I9d95723e5b1e73afd74867dc102958d900cf6688

15 months agosurface: Fix crash when accessing null 74/296374/1 accepted/tizen/unified/20230726.163543 accepted/tizen/unified/20230727.055140
Seunghun Lee [Wed, 26 Jul 2023 07:52:42 +0000 (16:52 +0900)]
surface: Fix crash when accessing null

This patch adds a null check before accessing the return value of
ds_subsurface_from_surface().

The return value of ds_subsurface_from_surface() can be null even though
the ds_surface_is_subsurface() returns true. That's the case when the
subsurface has been destroyed.

Change-Id: I112dd4770b678f73e946be9773633083db8ce68b

15 months agoAdd a test for ds_allocator 45/296045/1
Seunghun Lee [Tue, 18 Jul 2023 04:38:43 +0000 (13:38 +0900)]
Add a test for ds_allocator

Change-Id: I262bdd0ca20da7b6748e58aa37c9cb4c1621663f

15 months agoAdd test cases for ds_{box,fbox}_transform() 75/295975/1 accepted/tizen/unified/20230720.164642
Seunghun Lee [Mon, 17 Jul 2023 06:56:06 +0000 (15:56 +0900)]
Add test cases for ds_{box,fbox}_transform()

How to run unittests with meson

$ meson setup builddir -Dtests=true
$ meson test -C builddir

Change-Id: I3ee8626d0871fd00591187191fccb8199d177c06

16 months agosurface: Simplify ds_surface_is_ancestor_of() 97/295797/2
Seunghun Lee [Thu, 13 Jul 2023 08:02:08 +0000 (17:02 +0900)]
surface: Simplify ds_surface_is_ancestor_of()

This also moves the surface_is_ancestor_of() to private header.

Change-Id: Ie099d68b2bff1b5786d0440809197b0327f8667f

16 months agosubsurface: Remove duplicate checks 96/295796/2
Seunghun Lee [Thu, 13 Jul 2023 07:31:47 +0000 (16:31 +0900)]
subsurface: Remove duplicate checks

The validation check for sub-surface can be made in create_subsurface()
and thereby duplication can be removed.

Change-Id: I9326707cd17bba393ad21b775cb5248b3f92f3fa

16 months agosubsurface: Remove check for subsurface on creation 95/295795/2
Seunghun Lee [Thu, 13 Jul 2023 07:11:42 +0000 (16:11 +0900)]
subsurface: Remove check for subsurface on creation

The sub-surface should be able to be created with the surface that used
to be a sub-surface. This has been unable because of
ds_surface_is_subsurface() so this patch removes this check.

Instead, the ds_surface_set_role() will ensure that if the given surface
can have a role.

Change-Id: I12f7b6fa525728f86404a7e8f14574ef66534c6a

16 months agosubsurface: Add missing cache initialization 64/295764/1
Seunghun Lee [Thu, 13 Apr 2023 01:08:22 +0000 (10:08 +0900)]
subsurface: Add missing cache initialization

This is to fix a crash attempting to use uninitilized cache state.

Change-Id: Ic7d4e241dee046e98b030c6ade815c28b55408bc

16 months agosubsurface: Add ds_subsurface_create() API 70/295370/1
Seunghun Lee [Fri, 28 Apr 2023 04:54:19 +0000 (13:54 +0900)]
subsurface: Add ds_subsurface_create() API

It's to allow compositor to create a wl_subsurface with its own wayland
resource id.

Change-Id: Iefd982885ec6deeaa8274399826aa9ff9936f09d

16 months agosubcompositor: Split out from compositor 13/295313/1
Seunghun Lee [Wed, 12 Apr 2023 07:53:25 +0000 (16:53 +0900)]
subcompositor: Split out from compositor

Change-Id: Ib3cd4a2caedccca91af3397df31ccaba20580ba0

16 months agoxdg_shell_v6: Emit new_surface signal on toplevel creation 75/295275/1
Seunghun Lee [Thu, 8 Jun 2023 23:50:42 +0000 (08:50 +0900)]
xdg_shell_v6: Emit new_surface signal on toplevel creation

It's actually supposed to emit new_surface signal on wl_surface.commit()
of xdg_toplevel_v6.
However, the tizen application doesn't follow this rule for historical
reason, and this patch makes new_surface signal be emitted on creation
of toplevel to make tizen applications work properly.

Change-Id: I5dc7f8104935ac1ad67b235afca384dbf8eb7414

16 months agoxdg_shell_v6: Remove some exception handling 74/295274/1
Seunghun Lee [Thu, 8 Jun 2023 06:32:57 +0000 (15:32 +0900)]
xdg_shell_v6: Remove some exception handling

This is to support for tizen applications. They are not conforming to
some of the rules that wayland specification requires, for example, the
rule that the surface can not have more than one role.

Change-Id: I1bc782ba862c6552c6307efd73170051c1cc0906

16 months agoxdg_shell_v6: Reset role data 42/295242/2
Seunghun Lee [Fri, 2 Jun 2023 04:36:09 +0000 (13:36 +0900)]
xdg_shell_v6: Reset role data

It has to reset role data when xdg_toplevel_v6 is destroyed.
Otherwise, the role->commit() callback can be called with a freed
toplevel pointer and the process would end up being crashed.

Change-Id: Ida94443c1bb256847b8a1cbadd69db94afef452b

16 months agosurface: Add null check on role_data 39/295239/2
Seunghun Lee [Fri, 2 Jun 2023 04:33:46 +0000 (13:33 +0900)]
surface: Add null check on role_data

The role_data can be null if the role is no longer valid.

Change-Id: If7da1906ea9c8aa1bffc440417ea7881c22e57ab

16 months agoxdg_shell_v6: Add ds_xdg_surface_v6_from_resource() 19/295219/1
Seunghun Lee [Tue, 23 May 2023 01:24:28 +0000 (10:24 +0900)]
xdg_shell_v6: Add ds_xdg_surface_v6_from_resource()

Change-Id: Ie357eff7049a409a3bed99e65a77085aa69b5a50

16 months agoExpose ds_xdg_shell_v6 as ABI 18/295218/1
Seunghun Lee [Tue, 23 May 2023 01:23:32 +0000 (10:23 +0900)]
Expose ds_xdg_shell_v6 as ABI

Change-Id: Icde932664fe639394c2aef2ea22f0a867ca9f7c5

16 months agoxdg_toplevel_v6: Implement remaining part of xdg_toplevel_v6 08/295108/1
Seunghun Lee [Mon, 15 May 2023 06:57:00 +0000 (15:57 +0900)]
xdg_toplevel_v6: Implement remaining part of xdg_toplevel_v6

This makes xdg_shell_v6 work properly.

Change-Id: I33ff81c5870aaf101471a7d68666e61d11d708be

16 months agoxdg_toplevel_v6: Remove an unused field in struct 20/294920/2
Seunghun Lee [Mon, 15 May 2023 05:27:52 +0000 (14:27 +0900)]
xdg_toplevel_v6: Remove an unused field in struct

Change-Id: Idab336b073cbcc768c1d3c1bc7af6d10b144f76e

16 months agoxdg_toplevel_v6: Use toplevel for user data 19/294919/2
Seunghun Lee [Mon, 15 May 2023 05:05:58 +0000 (14:05 +0900)]
xdg_toplevel_v6: Use toplevel for user data

Change-Id: I5445632e0e56b3fb1273fab90edde85e43649392

16 months agoxdg_shell_v6: Add ds_xdg_toplevel_v6_set APIs 39/294639/1
Seunghun Lee [Mon, 15 May 2023 01:54:03 +0000 (10:54 +0900)]
xdg_shell_v6: Add ds_xdg_toplevel_v6_set APIs

Change-Id: I3d57455ff3cdd41e0abb3f30b2513f777d422122

16 months agoxdg_toplevel_v6: Fix typo 32/294632/2
Seunghun Lee [Mon, 15 May 2023 01:42:11 +0000 (10:42 +0900)]
xdg_toplevel_v6: Fix typo

Change-Id: I245eaf9b7ba2024cefa0702fb2b238349aa67ffa

16 months agodata_source: Remove pre_destroy signal 31/294631/1
Seunghun Lee [Thu, 11 May 2023 06:06:29 +0000 (15:06 +0900)]
data_source: Remove pre_destroy signal

Now that the wl_signal_emit_mutable() is used, the `pre_destroy` signal
is no longer necessary.

Change-Id: Iec6ea58c20e46b3de97625904b9b58499d19f024

16 months agotinyds: Fix crash when unlink uninitialized list 23/294623/1
Seunghun Lee [Thu, 11 May 2023 05:15:58 +0000 (14:15 +0900)]
tinyds: Fix crash when unlink uninitialized list

Change-Id: I33622bf48720fcf892e98fd6095ac3655aba7341

16 months agoUse wl_signal_emit_mutable() 47/294547/1
Seunghun Lee [Thu, 11 May 2023 04:48:11 +0000 (13:48 +0900)]
Use wl_signal_emit_mutable()

It's a safer version of wl_signal_emit().

Change-Id: I938dd15116549640c24af97e8f4a3b0bd379ae3c

16 months agotinyds: Clear focus only if no view to be focused 46/294546/1
Seunghun Lee [Wed, 21 Jun 2023 05:12:04 +0000 (14:12 +0900)]
tinyds: Clear focus only if no view to be focused

Change-Id: I6fb3fa176443bbdf6768a194f8415acf2a98b02d

16 months agotinyds: Activate/deactivate xdg_surfaces 45/294545/1
Seunghun Lee [Wed, 21 Jun 2023 05:08:35 +0000 (14:08 +0900)]
tinyds: Activate/deactivate xdg_surfaces

This change will activate and deactivate xdg_surfaces when keyboard
focus changes. This lets client know if it has focus and the client will
repaint accordingly.

Change-Id: Idf774f5d4e0bb8a272d5833b235ea2d4433d75f4

16 months agoExpose ds_buffer as ABI 27/294527/1
Seunghun Lee [Thu, 23 Mar 2023 08:10:56 +0000 (17:10 +0900)]
Expose ds_buffer as ABI

Change-Id: Ife3b046ef3d6ef4afc8efdfa188e8bdf09791f32

16 months agosurface: Initialize current commit state before update 93/294393/3
Seunghun Lee [Thu, 15 Jun 2023 00:53:31 +0000 (09:53 +0900)]
surface: Initialize current commit state before update

Since the current state is used to distinguish updated fields, the
current state has to be initialied instead of accumulating.

Change-Id: Ibbed13100b949993a2d230200950c99cda4cc174

16 months agosurface: Accumulate commit state on surface_state_move 92/294392/1
Seunghun Lee [Thu, 15 Jun 2023 00:51:44 +0000 (09:51 +0900)]
surface: Accumulate commit state on surface_state_move

Instead of having replaced commit state with next one, this patch
accumulates commit state. Otherwise, cached state would be replaced by
the pending state.

If a state needs to be replaced, then caller can initialie the commit
state before the call to surface_state_move().

Change-Id: I92072b38989f14fa4db84d95329d058cab6614f2

16 months agosubsurface: Add request_move signal 69/294269/2
Seunghun Lee [Tue, 30 May 2023 08:20:16 +0000 (17:20 +0900)]
subsurface: Add request_move signal

This is to inform an exact timing to move a subsurface.

Change-Id: Ib2aaaccbdc6a92bfa7cf7b818cc06a3057414631

16 months agosubsurface: Add cached signal 68/294268/3
Seunghun Lee [Thu, 27 Apr 2023 04:47:42 +0000 (13:47 +0900)]
subsurface: Add cached signal

The cached signal can be used for wl_surface add-on objects such as
wl_viewport, wp_presnetaiton to get a chance to cahce its interesting
pending states.

Change-Id: I7e0d66e833686853b66d8ff8251edc97bdfe7aa2

16 months agosubsurface: Add ds_subsurface_from_surface() 67/294267/2
Seunghun Lee [Thu, 27 Apr 2023 04:46:28 +0000 (13:46 +0900)]
subsurface: Add ds_subsurface_from_surface()

As the name explains itself, the API is to get a ds_subsurface from a
ds_surface.

Change-Id: Iada285039de4e78c1df171d885128c72cd3cdc1c

16 months agobox: Use spaces instead of a tab for indentation 65/294265/2
Seunghun Lee [Thu, 15 Jun 2023 05:40:44 +0000 (14:40 +0900)]
box: Use spaces instead of a tab for indentation

Change-Id: I4eb36cc4491f5e5e0901f435288fad5a6f35ff2d

17 months agobox: Remove duplicate transform calculation 58/294258/1
Seunghun Lee [Thu, 15 Jun 2023 01:54:51 +0000 (10:54 +0900)]
box: Remove duplicate transform calculation

Change-Id: I20a78ff303061e0bb1a3a42dbc35f0ee4f685687

17 months agoExpose ds_subsurface as ABI 45/294245/2
Seunghun Lee [Wed, 22 Feb 2023 05:35:35 +0000 (14:35 +0900)]
Expose ds_subsurface as ABI

Change-Id: I57a13628ea72393ec0b4d89442ee20bc9b5751b0

17 months agosubsurface: Destroy after destruction of parent surface 41/294241/1
Seunghun Lee [Fri, 28 Apr 2023 05:06:33 +0000 (14:06 +0900)]
subsurface: Destroy after destruction of parent surface

A subsurface will be destroyed after its parent surface because the
subsurface becomes inert when its parent is destroyed.
Thus, we can make sure that a subsurface always has a valid parent.

Change-Id: I50ac03e9e3e7bd4373a2f028d89697d597016889

17 months agosubsurface: Add cached states 40/294240/1
Seunghun Lee [Wed, 22 Feb 2023 00:52:38 +0000 (09:52 +0900)]
subsurface: Add cached states

This makes subsurface work with cached states depending on the sync
mode.

Change-Id: I186de52c6c4bc20329e61e7ec2a85185dedfd6c8

17 months agoExpose ds_surface as ABI 94/294094/1
Seunghun Lee [Wed, 22 Feb 2023 05:10:00 +0000 (14:10 +0900)]
Expose ds_surface as ABI

Change-Id: I43ee7c7423915ead7ac0b0f924436e9e84ac9c48

18 months agodrag: Fix wrong error check 69/292669/1
Seunghun Lee [Thu, 11 May 2023 05:46:27 +0000 (14:46 +0900)]
drag: Fix wrong error check

That was a mistake made by commit 3f83416b.

Change-Id: I2431b9f9a0d5dd6ba1eddb1635d9c8e172c6ec82

19 months agoFix build error by -Werror=shadow 97/290097/1 accepted/tizen/unified/20230320.164226 accepted/tizen/unified/20230321.035433
Seunghun Lee [Mon, 20 Mar 2023 04:48:36 +0000 (13:48 +0900)]
Fix build error by -Werror=shadow

The global variable of buffer seemed to have been accidently inserted by
the commit, 4304a4d4. This removes this unused variable.

Change-Id: I98118f54d38912a0e54758c4caeaaab5cb48f3b1

19 months agoutil: Fix mismatched declaration of prototype 96/290096/1
Seunghun Lee [Mon, 20 Mar 2023 04:47:51 +0000 (13:47 +0900)]
util: Fix mismatched declaration of prototype

Change-Id: I845c684ea869bfda3a9d57409fc827c99f81677a

19 months agoinput_device: Remove unused include 95/290095/1
Seunghun Lee [Thu, 29 Dec 2022 07:21:55 +0000 (16:21 +0900)]
input_device: Remove unused include

Change-Id: Id761447c4eaa675df8b1e1a3bdfd210fec7f008e

19 months agoinput_device: Put input_device impelmentation into a directoy 94/290094/1
Seunghun Lee [Thu, 29 Dec 2022 07:16:41 +0000 (16:16 +0900)]
input_device: Put input_device impelmentation into a directoy

Change-Id: I4880c9821045ba4ffc5480f756295459048e8939

19 months agocompositor: Put compositor implementation into a directory 93/290093/1
Seunghun Lee [Thu, 29 Dec 2022 06:57:47 +0000 (15:57 +0900)]
compositor: Put compositor implementation into a directory

This patch renames and puts all related compositor implementation into
one directoy.

Change-Id: I819e0e6f9e4c574a3e03ab7f2b452dd7fa9b5cec

19 months agoAdd defs.h to export helper macros 92/290092/1
Seunghun Lee [Thu, 8 Dec 2022 09:20:04 +0000 (18:20 +0900)]
Add defs.h to export helper macros

We need to export helper macros and definitions for libds-tizen.

Change-Id: I14d8e064980a56f98e9f107473638b42b2e5eb4d

2 years agoRename event types for consistency 99/283599/1 accepted/tizen/unified/20230106.165106
Seunghun Lee [Thu, 27 Oct 2022 06:00:37 +0000 (15:00 +0900)]
Rename event types for consistency

The event type names should be prefixed with `ds_{submodule}_event_`.

Change-Id: I72dd9ee5df04042dd061a9c5a0641a6c120dca22

2 years agoCreate wl_resource with minimum version 92/283592/2
Seunghun Lee [Mon, 24 Oct 2022 01:41:57 +0000 (10:41 +0900)]
Create wl_resource with minimum version

The version of wl_resource has to be the minimum among the versions for
which both compositor and client support.

Change-Id: I16e310e8f5aaec570b1dc1a956b05fd115facd58

2 years agosurface: Use DS_FLAG_* macros 91/283591/2
Seunghun Lee [Sun, 23 Oct 2022 23:51:33 +0000 (08:51 +0900)]
surface: Use DS_FLAG_* macros

Change-Id: I67d3134e36c70aa7b490dd7f7c4d23438789118e

2 years agoReplace MIN macro with DS_MIN 90/283590/2
Seunghun Lee [Sun, 23 Oct 2022 23:43:16 +0000 (08:43 +0900)]
Replace MIN macro with DS_MIN

Change-Id: I03566bf438710b36387c27bbb547bb7bf0ee1c7f

2 years agoUse DS_ASSERT macro instead of assert() 89/283589/2
Seunghun Lee [Fri, 21 Oct 2022 05:41:52 +0000 (14:41 +0900)]
Use DS_ASSERT macro instead of assert()

Change-Id: Iecf32f4173556f50c913c50d58338062ae1daf24

2 years agoutil: Add helper macros 88/283588/2
Seunghun Lee [Thu, 20 Oct 2022 04:26:33 +0000 (13:26 +0900)]
util: Add helper macros

Change-Id: I955e2744468e314250af2bc3479496b992cb604c

2 years agoFix unused variable warning 87/283587/1
Seunghun Lee [Thu, 27 Oct 2022 06:02:35 +0000 (15:02 +0900)]
Fix unused variable warning

Change-Id: Iabad6e7f7d390da7ff9c312b49bf7e96a90c3563

2 years agobackend-wayland: create cursor and show it when pointer enters 81/283381/1
duna.oh [Mon, 17 Oct 2022 08:38:32 +0000 (17:38 +0900)]
backend-wayland: create cursor and show it when pointer enters

get wl_cursor from default cursor theme.

name: "left_ptr"
image_count: 1
image[0]->width: 10, height: 16, hotspot_x: 1, hotspot_y: 1

Change-Id: I7438282d007647aeab3fd9bcb0c5eaf5dc5f155b

2 years agoclients: Fix null dereferencing 11/282511/1
duna.oh [Tue, 4 Oct 2022 03:35:07 +0000 (12:35 +0900)]
clients: Fix null dereferencing

Change-Id: I5bf4aaa0c28e552d1377585a6cc570e1ab376305

2 years agolibinput: use ds_log_error() which calls 'strerror_r' 38/281438/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063730 accepted/tizen/7.0/unified/hotfix/20221116.110118 accepted/tizen/unified/20220921.091751 tizen_7.0_m2_release
duna.oh [Mon, 19 Sep 2022 02:33:35 +0000 (11:33 +0900)]
libinput: use ds_log_error() which calls 'strerror_r'

strerror makes no guarantee of thread safety.
It'd better use strerror_r function instead.

Change-Id: I8fe56323b0f81343e7d8082146724a7223cbdebf

2 years agosurface: Flesh out handling viewport 75/281275/1 accepted/tizen/unified/20220919.021619
Seunghun Lee [Thu, 25 Aug 2022 07:21:46 +0000 (16:21 +0900)]
surface: Flesh out handling viewport

Change-Id: Ida32b06ea9b1f2aa38f9dc552c2fb318daa4fa77

2 years agosurface: Add ds_surface_viewport 74/281274/1
Seunghun Lee [Thu, 25 Aug 2022 06:50:37 +0000 (15:50 +0900)]
surface: Add ds_surface_viewport

This introduces ds_surface_viewport and its functions to be used for
manipulating viewport of surface.

The ds_surface_viewport is to provide an exclusive access of surface
viewport for all viewport protocols such as wp_viewport, scaler, and
tizen_viewport.

Change-Id: Ia502902ad418120993cf7f14a6348bcf5e33ba8e

2 years agoutil: Add box util 73/281273/1
Seunghun [Tue, 23 Aug 2022 07:32:09 +0000 (16:32 +0900)]
util: Add box util

Change-Id: I759c39e0dedf218f63064cd7e479de996d058987

2 years agoclients: Fix null dereferencing 53/280853/1 accepted/tizen/unified/20220908.013417
Seunghun Lee [Tue, 6 Sep 2022 01:36:38 +0000 (10:36 +0900)]
clients: Fix null dereferencing

Change-Id: Ibce07f092400ecedbe3ad93d220c06fe3c87f97a

2 years agoclients: Silence wstringop-truncation warning 52/280852/1
Seunghun Lee [Tue, 6 Sep 2022 01:18:42 +0000 (10:18 +0900)]
clients: Silence wstringop-truncation warning

Change-Id: Ia90870b6b2b21832f7f440cd141c368a314a86b3

2 years agolog: Replace strerror with strerror_r 51/280851/1
Seunghun Lee [Mon, 5 Sep 2022 09:36:44 +0000 (18:36 +0900)]
log: Replace strerror with strerror_r

This means to use thread safe API.

Change-Id: I68d157d1107261d3252991ec54ae8f16381fb221

2 years agoclient_buffer: Assert if shm_buffer is null 50/280850/1
Seunghun Lee [Mon, 5 Sep 2022 04:45:32 +0000 (13:45 +0900)]
client_buffer: Assert if shm_buffer is null

Change-Id: I55b352663dcb9a2edbf863a279b9bdcc44e75269

2 years agolibinput: do not call close() when fd is negative 96/280796/1
duna.oh [Mon, 5 Sep 2022 02:17:00 +0000 (11:17 +0900)]
libinput: do not call close() when fd is negative

fix potential security issue

Change-Id: Ie6ee22ced3c913902124daed181056bfdcaa7cd7

2 years agotinyds: use 'rand_r' instead of function 'rand' 95/280795/1
duna.oh [Fri, 2 Sep 2022 06:36:57 +0000 (15:36 +0900)]
tinyds: use 'rand_r' instead of function 'rand'

For thread safety, rand_r is preferred to use.

Change-Id: I6076f937595480a28fb83e9efadc02e53f345542

2 years agoregion: Add missing return 89/280289/1 accepted/tizen/unified/20220829.062544 submit/tizen/20220826.081449
Seunghun Lee [Fri, 26 Aug 2022 06:28:39 +0000 (15:28 +0900)]
region: Add missing return

There is nothing to do except for copy a source to a destination when
1.0 scale given.

Change-Id: Id6d5dcfc51763280d46c199c5e93356a74fab898

2 years agoshm: Fix using negative fd 54/280254/1
Seunghun Lee [Thu, 25 Aug 2022 09:28:27 +0000 (18:28 +0900)]
shm: Fix using negative fd

Change-Id: Ib241e89b48c3ff338ecd30178a33a7477802ff0b

2 years agoallocator/shm: Cast int to size_t to avoid warning 53/280253/1
Seunghun Lee [Thu, 25 Aug 2022 09:08:32 +0000 (18:08 +0900)]
allocator/shm: Cast int to size_t to avoid warning

Change-Id: I1b5f9fefb99222d7f150743acd5c03b8a1e9e12c

2 years agoclients/simple-shm-shell: Don't use vulnerable functions 52/280252/1
Seunghun Lee [Thu, 25 Aug 2022 08:57:30 +0000 (17:57 +0900)]
clients/simple-shm-shell: Don't use vulnerable functions

Change-Id: I800e57d29f660844fee806b7916ab6c4edffa74b

2 years agosurface: Fix emitting commit event twice 09/280209/2
Seunghun Lee [Thu, 25 Aug 2022 07:23:32 +0000 (16:23 +0900)]
surface: Fix emitting commit event twice

This patch removes one of the commit events being emitted and therefore
the commit event is emitted in surface_commit_state() once.
And this moves surface->role->commit() accordingly.

Change-Id: I427d3170b53acc08527892c2c2dc2f559870231e

2 years agoUpdate .gitignore 08/280108/1
Seunghun Lee [Tue, 23 Aug 2022 07:52:32 +0000 (16:52 +0900)]
Update .gitignore

This adds vim swapfiles.

Change-Id: Ic5adc7b758e70dfbac2022ee2cce37ca6cc32e7a

2 years agosubsurface: add ds_subsurface_from_resource 15/280015/2 accepted/tizen/unified/20220823.131807 submit/tizen/20220823.002323
SooChan Lim [Fri, 19 Aug 2022 11:10:01 +0000 (20:10 +0900)]
subsurface: add ds_subsurface_from_resource

This make get the ds_subsurface from wl_subusrface resource.

Change-Id: I8290a812980773fbe82197eb2062470b2ed1c303

2 years agodata_device: Fix null-dereferencing 25/280025/1
Seunghun Lee [Thu, 18 Aug 2022 08:49:13 +0000 (17:49 +0900)]
data_device: Fix null-dereferencing

Change-Id: I8f9ad9e1be245812d29d479dc8d4878126d7baba

2 years agodata_device: Fix crash with workaround 24/280024/1
Seunghun Lee [Thu, 18 Aug 2022 04:33:19 +0000 (13:33 +0900)]
data_device: Fix crash with workaround

data_offer_destroy() could be called twice on the destry signal of
data_source and it eventually led to crash.

Change-Id: If4530872cce7cbbaee7455a3dba71fd69abebee6

2 years agodata_device: Add support for touch drag 23/280023/1
Seunghun Lee [Thu, 18 Aug 2022 02:21:07 +0000 (11:21 +0900)]
data_device: Add support for touch drag

Change-Id: Ifed6d3b8718ddb4a465ad6c1836d24b61e148b27

2 years agodata_device: Fix crash when destroying data_offer 22/280022/1
Seunghun Lee [Thu, 18 Aug 2022 01:46:12 +0000 (10:46 +0900)]
data_device: Fix crash when destroying data_offer

The listener of destroy of data_source has to be removed when destroying
data_offer no matter whether offer->source is null or not.
That's because there is the case where calls data_offer_destroy after
nullifying offer->source.

Change-Id: I3c2fd97de39b52b4cae4de4c1390e773fb7c1047

2 years agodata_device: Nullify {drag,offer}->source 21/280021/1
Seunghun Lee [Wed, 17 Aug 2022 06:00:24 +0000 (15:00 +0900)]
data_device: Nullify {drag,offer}->source

This is to prevent the data_source from being destroyed repeatedly.

Change-Id: I5ce1efed2b81dabc8d7c8d9b5f8dea3b20b67fa7

2 years agodata_device: Send dnd finish when destroying data_offer 20/280020/1
Seunghun Lee [Wed, 17 Aug 2022 05:59:50 +0000 (14:59 +0900)]
data_device: Send dnd finish when destroying data_offer

Change-Id: I92ce0690b8dae6178c96cefd702b178e6fc7e610

2 years agodata_device: Fix formatting 19/280019/1
Seunghun Lee [Wed, 17 Aug 2022 04:48:22 +0000 (13:48 +0900)]
data_device: Fix formatting

Change-Id: Ib33ed7c3420c4302c77d338f9c6588576ede3594

2 years agodata_device, tinyds: Handle focus at data_device when a drag starts 18/280018/1
Seunghun Lee [Wed, 17 Aug 2022 04:40:50 +0000 (13:40 +0900)]
data_device, tinyds: Handle focus at data_device when a drag starts

This reverts commit "a0b0f5148126278f3a3a9f1770cc746222f97a3,
"tinyds: Call ds_seat_pointer_notify_enter() before notify_motion()".

Plus, ds_seat_pointer_notify_enter() is called by drag implementation.

Change-Id: Ib648df2f45c8274956bbc3ab557ba506002a3a91

2 years agoseat: Add ds_seat_pointer_get_focused_surface() 17/280017/1
Seunghun Lee [Wed, 17 Aug 2022 04:35:07 +0000 (13:35 +0900)]
seat: Add ds_seat_pointer_get_focused_surface()

This function will be used by data_device to give a focus when a drag
starts.

Change-Id: I13dc4ea73ac8b5d5c4bab6c3e62c1e4976e91a86

2 years agodata_device: Refactor code of drag and drop 16/280016/1
Seunghun Lee [Wed, 17 Aug 2022 01:15:01 +0000 (10:15 +0900)]
data_device: Refactor code of drag and drop

Change-Id: Ie3c7230e28a892929309ca394a116dce9a10b986

2 years agoseat: export functions for getting seat/seat_client 32/279932/1
duna.oh [Fri, 19 Aug 2022 01:37:33 +0000 (10:37 +0900)]
seat: export functions for getting seat/seat_client

This patch allows the compositor to be able to get
ds_seat/ds_seat_client from wl_resource.

Change-Id: I696a288fd5e99940cb2c918bb6c88d13a077adf3

2 years agooutput: add omitted APIs to header 43/279843/1 accepted/tizen/unified/20220821.211115 submit/tizen/20220818.083245 submit/tizen/20220819.052238
Junkyeong Kim [Thu, 18 Aug 2022 08:30:49 +0000 (17:30 +0900)]
output: add omitted APIs to header

Change-Id: Ie0d7d505e0aaa1f6d82265d69054db91997bee5a
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
2 years agobuffer: Add ds_buffer_get_resource API 39/279839/1
Junkyeong Kim [Fri, 12 Aug 2022 08:09:21 +0000 (17:09 +0900)]
buffer: Add ds_buffer_get_resource API

Change-Id: I31908a439eb438dfd99221618742174f1872e44f
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
2 years agotinyds: Handle request_start_drag event 30/279830/1
Seunghun Lee [Tue, 16 Aug 2022 10:23:41 +0000 (19:23 +0900)]
tinyds: Handle request_start_drag event

Change-Id: I83f87b5a8220aa5aa9dd3720bf02b57ab3e99bbd

2 years agotinyds: Call ds_seat_pointer_notify_enter() before notify_motion() 29/279829/1
Seunghun Lee [Tue, 16 Aug 2022 10:20:34 +0000 (19:20 +0900)]
tinyds: Call ds_seat_pointer_notify_enter() before notify_motion()

This is to give a chance to the pointer grabber of drag to handle enter.

Change-Id: I931ef7094f974b7150dd1add4d31a4c57f9afa33

2 years agotinyds: Fix server_view_at() 28/279828/1
Seunghun Lee [Tue, 16 Aug 2022 10:16:04 +0000 (19:16 +0900)]
tinyds: Fix server_view_at()

Change-Id: I522fde7fb5c82c29df22d74a524c75e6813cf839

2 years agotinyds: Place toplevel surfaces on random position 27/279827/1
Seunghun Lee [Tue, 16 Aug 2022 10:14:03 +0000 (19:14 +0900)]
tinyds: Place toplevel surfaces on random position

This is to make drag and drop test easier.

Change-Id: I11d8da198a42398e11c21b9901db3952f3daef59

2 years agodata_device: Add start drag operation 26/279826/1
Seunghun Lee [Tue, 16 Aug 2022 10:11:42 +0000 (19:11 +0900)]
data_device: Add start drag operation

Change-Id: I70007fd98a9e64653bb06a14e16ec5dc21b05b7c