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
a22ec93b
Commit
a22ec93b
authored
2 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Fix warnings
parent
3f441d02
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Quasar/Wayland/Client/JuicyPixels.hs
+6
-4
6 additions, 4 deletions
src/Quasar/Wayland/Client/JuicyPixels.hs
src/Quasar/Wayland/Connection.hs
+1
-1
1 addition, 1 deletion
src/Quasar/Wayland/Connection.hs
src/Quasar/Wayland/Protocol.hs
+1
-1
1 addition, 1 deletion
src/Quasar/Wayland/Protocol.hs
with
8 additions
and
6 deletions
src/Quasar/Wayland/Client/JuicyPixels.hs
+
6
−
4
View file @
a22ec93b
...
...
@@ -5,7 +5,6 @@ module Quasar.Wayland.Client.JuicyPixels (
)
where
import
Codec.Picture
import
Data.Bits
(
unsafeShiftL
,
unsafeShiftR
,
(
.|.
),
(
.&.
)
)
import
Foreign
import
Quasar.Prelude
import
Quasar.Wayland.Client.Buffer
...
...
@@ -24,7 +23,7 @@ toImageBuffer shm image = do
width
=
imageWidth
image
height
=
imageHeight
image
withForeignPtr
ptr
\
ptr'
->
forM
[(
x
,
y
)
|
x
<-
[
0
..
width
-
1
],
y
<-
[
0
..
height
-
1
]]
\
(
x
,
y
)
->
do
withForeignPtr
ptr
\
ptr'
->
forM
_
[(
x
,
y
)
|
x
<-
[
0
..
width
-
1
],
y
<-
[
0
..
height
-
1
]]
\
(
x
,
y
)
->
do
pokeByteOff
ptr'
((
x
+
(
y
*
width
))
*
4
)
(
pixelRgba8ToWlARGB
(
pixelAt
image
x
y
))
pure
buffer
...
...
@@ -37,5 +36,8 @@ pixelRgba8ToWlARGB (PixelRGBA8 r g b a) =
(
fi
g
`
unsafeShiftL
`
(
1
*
bitCount
))
.|.
(
fi
r
`
unsafeShiftL
`
(
2
*
bitCount
))
.|.
(
fi
a
`
unsafeShiftL
`
(
3
*
bitCount
))
where
fi
=
fromIntegral
bitCount
=
8
where
fi
::
Pixel8
->
Word32
fi
=
fromIntegral
bitCount
::
Int
bitCount
=
8
This diff is collapsed.
Click to expand it.
src/Quasar/Wayland/Connection.hs
+
1
−
1
View file @
a22ec93b
...
...
@@ -77,7 +77,7 @@ connectionThread connection work = asyncWithUnmask' \unmask -> unmask work `catc
where
traceAndDisposeConnection
::
SomeException
->
IO
()
traceAndDisposeConnection
(
isCancelAsync
->
True
)
=
pure
()
--
TODO
this logs- and then discard exceptions
. Ensure this is the desired behavior?
--
NOTE
this logs- and then discard
s
exceptions
(might need to be reworked later)
traceAndDisposeConnection
ex
=
traceIO
(
displayException
ex
)
>>
disposeEventuallyIO_
connection
sendThread
::
WaylandConnection
s
->
IO
()
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Wayland/Protocol.hs
+
1
−
1
View file @
a22ec93b
...
...
@@ -37,7 +37,7 @@ module Quasar.Wayland.Protocol (
Version
,
interfaceVersion
,
Side
(
..
),
IsSide
,
IsSide
(
MessageHandler
)
,
IsInterfaceSide
,
-- * For wl_display
...
...
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