Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar-wayland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
quasar-wayland
Commits
26c34d41
Commit
26c34d41
authored
2 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Move getBuffer to server module
parent
5b291d5e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Quasar/Wayland/Server/Surface.hs
+9
-0
9 additions, 0 deletions
src/Quasar/Wayland/Server/Surface.hs
src/Quasar/Wayland/Surface.hs
+0
-9
0 additions, 9 deletions
src/Quasar/Wayland/Surface.hs
with
9 additions
and
9 deletions
src/Quasar/Wayland/Server/Surface.hs
+
9
−
0
View file @
26c34d41
module
Quasar.Wayland.Server.Surface
(
initializeServerSurface
,
initializeWlBuffer
,
getBuffer
,
)
where
import
Control.Monad.Catch
import
Quasar.Prelude
import
Quasar.Wayland.Protocol
import
Quasar.Wayland.Protocol.Generated
...
...
@@ -104,3 +106,10 @@ initializeWlBuffer wlBuffer buffer = do
-- TODO propagate buffer destruction
destroy
=
destroyBuffer
buffer
}
getBuffer
::
forall
b
.
BufferBackend
b
=>
Object
'Server
Interface_wl_buffer
->
STM
(
Buffer
b
)
getBuffer
wlBuffer
=
do
ifd
<-
getInterfaceData
@
(
Buffer
b
)
wlBuffer
case
ifd
of
Just
buffer
->
pure
buffer
Nothing
->
throwM
$
InternalError
(
"Missing interface data on "
<>
show
wlBuffer
)
This diff is collapsed.
Click to expand it.
src/Quasar/Wayland/Surface.hs
+
0
−
9
View file @
26c34d41
...
...
@@ -5,7 +5,6 @@ module Quasar.Wayland.Surface (
newBuffer
,
lockBuffer
,
destroyBuffer
,
getBuffer
,
-- * Surface
Damage
(
..
),
...
...
@@ -76,14 +75,6 @@ tryFinalizeBuffer buffer = do
releaseBufferStorage
@
b
buffer
.
content
getBuffer
::
forall
b
.
BufferBackend
b
=>
Object
'Server
Interface_wl_buffer
->
STM
(
Buffer
b
)
getBuffer
wlBuffer
=
do
ifd
<-
getInterfaceData
@
(
Buffer
b
)
wlBuffer
case
ifd
of
Just
buffer
->
pure
buffer
Nothing
->
throwM
$
InternalError
(
"Missing interface data on "
<>
show
wlBuffer
)
class
SurfaceRole
a
where
surfaceRoleName
::
a
->
String
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment