101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

483
active users

#Xrender

0 posts0 participants0 posts today
Replied in thread

@thomasadam @peppe Thanks for that! I totally forgot about the decorations topic, which is of course very relevant, it means even jumping through the hoop and implementing a #wayland compositor, you can only deliver part of the functionality (and almost none of the looks) of your window manager.

But even with that issue solved, I would really dislike wayland's design. Although I *do* think that most of #X11 core drawing is obsolete and useless (mostly for the missing alpha channel), I think a display server should offer drawing facilities. Replace X with something dropping lots of cruft (indexed palettes, COMPOUND_TEXT, etc), instead incorporate extensions that everyone needs these days, extend #XRender (now as part of core) to offer more drawing primitives, etc ... you could have a replacement for X11 that's worth dealing with. And window managers could still be separate clients.

Replied in thread

@peppe To be clear about that, I don't question the fact that #X11 is full of old cruft that's mostly useless nowadays. It became more than clear to me while implementing my #xmoji tool, which uses almost exclusively #XRender requests for rendering (an *extension* to X11, not part of the core protocol), because X core drawing requests are really designed for 1990es hardware, supporting color palettes with limited entries, but no alpha channel whatsoever. Similar goes for font support in the X11 core protocol, it's useless supporting only bitmap fonts with no antialiasing etc, so I use client-side rasterizing (with freetype) and XRender only for compositing the result. There are more silly examples, like the "Compound Text" encoding monstrosity, because the core design predates Unicode, and so on....

In a nutshell, a major rework of what the X core protocol supports would be necessary.

But then, you can *still* dislike a suggested solution. I think #wayland is taking the "simplicity" much too far, so now both compositors and clients (rendering windows) have to do the same stuff over and over again. It's a pointless exercise trying to create a wayland client without huge libraries (such as e.g. cairo for client-side rendering, better yet use a full-blown toolkit like Qt or GTK that already makes use of cairo), while this is perfectly possible for X.

Well, I really like #X11 (#Xorg) ... and my son loves #PeppaPig. Which gives me a stupid idea. I could write something called #Xchicken. Make some chicken lay some eggs with mouse clicks on some #XRender surface.

Rough roadmap:
- Draw some chicken and eggs, probably as SVG?
- Reuse code from #Xmoji, add special widget supporting some "layered canvas"
- Implement game logic
- Add sound? (Hm, gotta look into #OSS and maybe #sndio, cause #FreeBSD ... #Linux weirdness maybe later)
- ....?

I'll probably never start though 🙈

You might have noticed development of #Xmoji slowed down a bit. My time is currently very limited, but another reason is slowly closing in on a version 1.0, and I want to give it some time for proper testing.

I need your help, please! 😁

Xmoji 0.8 introduced an important part for #i18n, translations. But I'm not exactly fluent in many languages. Please, if you can, help me translate! The process is documented in https://github.com/Zirias/xmoji/blob/master/TRANSLATE.md . If there are any issues with these instructions, please let me know.

Xmoji aims to be the "best" tool to input emojis with "pure" X11:

  • Written in plain #C, with minimal dependencies
  • Uses #Xrender for its UI, communicates with the X server using #xcb
  • Offers two methods for input: Faked keyboard events or the "primary selection"
  • Has a search tab and a list of recently used emojis
  • Customizable appearance using X resources
  • Several options to configure key injection and the search method

Roadmap to V1.0:

  • Optional single-instance mode
  • Optional tray icon

#X11 #emoji #keyboard

Getting closer: I now have a Pixmap class (to hold and render bitmap data, loading it from #PNG using #libpng), an ImageLabel widget to display a pixmap, and the first working "real" (using #EWMH) dialog window! 🥳 (of course, for testing, an "about box" 🙈)

libpng was surprisingly easy. Getting bitmap data with an alpha channel in some #X11 pixmap was surprisingly hard 🧐. It seems just uploading it with #xcb (xcb_image_put) converts the alpha channel to a single bit, making the corners look super ugly 🤨.

So now, I separate out the alpha channel to upload it to a separate pixmap and then combine that with the rgb-pixmap into an argb-pixmap that's finally used for rendering, here's the whole dance:
github.com/Zirias/xmoji/blob/b
I *could* save one rendering request by keeping those two pixmaps and render with a mask each time, but didn't because it will consume more server-side memory...

#X11 and #XRender experts: Do I miss anything, is there a saner way? 🤔

Replied in thread

Next step completed, my #TextBox widget now supports mouse input: click, doubleclick and drag 🥳.

Not so nice: With overall more drawing operations, I see #flicker happening more often 😒. Did some research already, it seems with #XRender, the only way to avoid it would be to render to some #pixmap (instead of the window directly) and use #XPresent to get it on the screen? @thomasadam do you know an "easier" way? 🙈

Replied in thread

Adventures in #X11 #programming with #xcb and #XRender: THE UGLY ...

Took me hours(!) to figure out what's going on here. 🤬 Once I discovered this rendering bug goes away when I force DRI2 with EXA (instead of DRI3 with Glamor), I was finally sure there's a bug outside my code. Never seen it in any other X11 application, but I guess XRender isn't used that much nowadays.

Well, for now, added a "glitch flag" to enable a workaround:
github.com/Zirias/xmoji/commit

Experimenting with HW Accell these days.
So far it seems all our supported devices can actually use hardware acceleration in #Plasma.
The #Lima devices are however limited to using #Xrender as backend, so that will have to be the default for all.

#xfce editions also seem to be working well with it.

Question: Do you want HW Accell on your device?
And what device do you have?
🤔