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
fa7c8a66
Commit
fa7c8a66
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Move tracing back into protocol core
parent
712f37af
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/Protocol/Core.hs
+6
-4
6 additions, 4 deletions
src/Quasar/Wayland/Protocol/Core.hs
src/Quasar/Wayland/Registry.hs
+1
-1
1 addition, 1 deletion
src/Quasar/Wayland/Registry.hs
with
7 additions
and
5 deletions
src/Quasar/Wayland/Protocol/Core.hs
+
6
−
4
View file @
fa7c8a66
...
...
@@ -225,7 +225,6 @@ instance IsSide 'Server where
maximumId
=
0xffffffff
--- | Empty class, used to combine constraints
class
(
IsSide
s
,
IsInterface
i
,
...
...
@@ -506,9 +505,9 @@ runProtocolTransaction (protocol@ProtocolHandle{stateVar}) action = do
-- | Run a 'ProtocolM'-action inside 'STM'.
--
-- Exceptions are not handled and reset the transaction (as usual with STM).
--
-- Throws an exception, if the protocol is already in a failed state.
--
-- Exceptions are not handled (i.e. they usually reset the STM transaction and are not stored as a protocol failure).
runProtocolM
::
ProtocolHandle
s
->
ProtocolM
s
a
->
STM
a
runProtocolM
protocol
action
=
either
throwM
(
runReaderT
action
)
=<<
readTVar
protocol
.
stateVar
...
...
@@ -635,7 +634,10 @@ getMessageAction
->
Get
(
ProtocolM
s
()
)
getMessageAction
object
@
(
Object
_
_
_
_
objectHandler
)
opcode
=
do
verifyMessage
<-
getWireDown
object
opcode
pure
$
handlerHandleMessage
objectHandler
object
=<<
verifyMessage
pure
do
message
<-
verifyMessage
traceM
$
"<- "
<>
showObjectMessage
object
message
handlerHandleMessage
objectHandler
object
message
type
RawMessage
=
(
GenericObjectId
,
Opcode
,
BSL
.
ByteString
)
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Wayland/Registry.hs
+
1
−
1
View file @
fa7c8a66
...
...
@@ -22,7 +22,7 @@ createClientRegistry :: Object 'Client Interface_wl_display -> ProtocolM 'Client
createClientRegistry
wlDisplay
=
mfix
\
clientRegistry
->
do
globalsVar
<-
lift
$
newTVar
HM
.
empty
(
wlRegistry
,
newId
)
<-
newObject
@
'Client
@
Interface_wl_registry
(
traceWireCallback
(
callback
clientRegistry
)
)
(
wlRegistry
,
newId
)
<-
newObject
@
'Client
@
Interface_wl_registry
(
callback
clientRegistry
)
sendMessage
wlDisplay
$
WireRequest_wl_display_get_registry
newId
pure
ClientRegistry
{
...
...
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