Commit Graph

387 Commits

Author SHA1 Message Date
Yuxuan Shui 4ff9e810ff
Sort out the dbus function prototypes
* Moved dbus prototypes from common.h to dbus.h
* Removed private function prototypes from dbus.h
* Removed private macros from dbus.h
* Hide dbus types from common.h

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 23:12:27 +00:00
Yuxuan Shui b5b0f4af7f
Convert printf_errf/dbgf in several files
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 16:54:51 +00:00
Yuxuan Shui 3966491846
Convert printf_errf/dbgf in opengl.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 16:50:11 +00:00
Yuxuan Shui 2af0b48c7b
Convert printf_errf in common.h
And remove some unused functions.

And improve some error messages.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 03:56:37 +00:00
Yuxuan Shui 833eb966f1
Convert print_errf/dbgf in win.c and compton.c
And improve some of the log messages. Like, when compton exits because
of unsupported options, explain which options are causing compton to
quit.

Convert some debugging messages that are guarded behind ifdef's to log_trace,
so user don't need to re-compile to enabled them.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 03:56:31 +00:00
Yuxuan Shui d9409ae2c9
Add command line and config file option log-level
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 01:26:04 +00:00
Yuxuan Shui 1bcd7f2f7a
Add a simple logging framework
It's not very pretty now, but it will get better.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 01:02:56 +00:00
Yuxuan Shui e58cbf8add
Convert non-mandatory attributes to macros
They're shorter and more portable.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-19 20:50:02 +00:00
Yuxuan Shui eabe2b5bb8
Explicitly cast X sequence number
Fix an undefined behavior.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-17 00:51:27 +00:00
Yuxuan Shui 50ea3617ef
Move some deinitialization to render.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 03:00:56 +00:00
Yuxuan Shui 404a6b47ad
Move presum_gaussian to render.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 02:49:41 +00:00
Yuxuan Shui 9ce1387f52
Move a few more functions into render.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 00:53:54 +00:00
Yuxuan Shui baeb4572ff
Move rendering related functions out of compton.c
Moved:
* Blur kernel related functions to kernel.c
* Vsync related functions to vsync.c
* paint related functions to render.c

This will make the `split-backend` branch easier to rebase.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 00:50:46 +00:00
Yuxuan Shui 85c5d34ce1
Add missing CONFIG_OPENGL check
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 20:09:49 +00:00
Yuxuan Shui b73dce1d6d
Replace mstrcpy, mstrncpy with strdup, strndup
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 19:07:14 +00:00
Yuxuan Shui b8912fa749
Use checked allocation everywhere
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 18:57:46 +00:00
Yuxuan Shui acb81bc9a9
Add log.h to files that need it
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 17:53:17 +00:00
Yuxuan Shui 0cebbc370a
Function movements
* string functions mstr*() are moved to string_utils.c
* allocation wrappers are moved to utils.h
* printf_* functions are moved to log.h

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 17:43:36 +00:00
Dan Elkouby 6195422c66 Swap control only works with OpenGL 2018-12-15 11:22:38 +02:00
Dan Elkouby e2182bb00b Work around mesa's default-on swap control 2018-12-14 19:25:05 +02:00
Dan Elkouby de1cce21ba Merge opengl-{,m}swc vsync methods
Both methods are redundant. Prefer Mesa's own extension when available,
fall back to the old SGI extension otherwise (NVIDIA drivers for the
most part).
2018-12-14 19:24:03 +02:00
Yuxuan Shui 0899a9689e
Remove unused variable in paint_preprocess
And fix a memory leak caused by it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-09 21:00:32 +00:00
Yuxuan Shui dffde065b1
Make the shadow actually gaussian
The old shadow kernel formula is not "wrong" per se, as the only judge
is if it looks good. However, the formula used is not really gaussian.
Also, the kernel size calculation doesn't really make sense to me.

This commit change the kernel formula to actually use a gaussian
distribution. As far as I can tell, there is no perceivable difference.
Except now the effective shadow radius is smaller for the same config.

Also, made that part of code a bit more mordern.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-09 02:07:08 +00:00
Yuxuan Shui da3df75a8c
Make sure the vsync methods are really available
libglvnd seems to return a pointer to a function that does NOTHING
for things the backing driver doesn't support.

So we check if the extension is actually advertised before using it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-08 18:22:59 +00:00
Yuxuan Shui f83eb79c05
Add wintype option `redir-ignore`.
This cause certain window types to be ignored in deciding whether the
screen should be redirected after being unredirected.

Fixes #58

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-04 16:36:49 +00:00
Yuxuan Shui f97cf48865
Clean up the wintype option logic
I just realized wintype option shadow and fade never worked. If you set
the global shadow option to true, wintype shadow option will have no effect.

Now the wintype options will properly override the global ones.

Also remove deprecated options from compton.sample.conf.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-04 15:13:08 +00:00
Yuxuan Shui a3f753105f Don't allocate libev struct separately
Elimiate some annoying types.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-27 00:32:08 +00:00
Yuxuan Shui 531aafabb5 Fix SIGUSR1 handling
Calling ev_break() in a signal handler doesn't work. Instead, we setup a
libev ev_signal handler for this.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-26 23:57:55 +00:00
Yuxuan Shui b89dadec40 Fix a wrong type
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-26 23:57:55 +00:00
Yuxuan Shui 2827a020a4 Handle SIGINT
Exit gracefully so sanitizer can do their jobs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-26 23:57:55 +00:00
Yuxuan Shui 90a4b201bd Re-word some of the comments
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-26 23:57:55 +00:00
Yuxuan Shui 010a0c34ca Don't delay update when refresh rate is not available
Fix a divide by zero in delay time calculation.

Fixes #56
2018-11-26 16:53:57 +00:00
Yuxuan Shui 0a6f48dba2 Support all alpha values
Remove alpha_step, and support all 256 alpha values.

1 pixel pictures don't really use that many resources.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-19 12:43:46 +00:00
yshui c389a1335d
Merge pull request #46 from yshui/full-shadow
Add per window type option full-shadow
2018-11-19 12:31:11 +00:00
Yuxuan Shui f834cf20ae Print deprecation message for --glx-fshader-win
No functionality is removed in this commit.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-11 19:38:58 +00:00
Yuxuan Shui bcab5d1518 Workaround the incompatibility between DRI2 and xcb
When using DRI2, Mesa uses XESetWireToEvent to hook into Xlib's event
handling loop, so it can get notified when certain DRI2 event happens,
which is crucial to the normal functioning of GLX.

When xcb is owning the event queue (meaning libxcb is doing all the
event handling), those functions registered by Mesa will never be
called, thus GLX will malfunction, leading to screen flickers or visual
artifacts.

This commit uses a hack from Qt to manually call those functions in
compton.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-10 22:25:41 +00:00
Yuxuan Shui 683cda0b91 Set clip region on the target picture
Setting it on the target buffer picture has no effect. Fix performance
problem when using xrender with virtual box.

Fixes #40

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-10 12:55:08 +00:00
Yuxuan Shui 46d162cec9 Print useful message when clear-shadow is used
Points the user to the full-shadow per window type option.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-09 21:04:22 +00:00
Yuxuan Shui 0dcb0e0dc6 Add per window type option full-shadow
When this option is enabled for a window type, shadow will be drawn in
areas that are obscure by the shape of the window.

Useful when the given window type has parts of the window transparent,
and you want to have shadows in those areas.

Fixes #45

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-09 19:56:05 +00:00
Yuxuan Shui b18d46bcbd Revert "Remove xrender-sync and xrender-sync-fence"
This reverts commit 50e2259404.

Temporarily revert the removal until we have more information about this whole
thing.

Turns out a couple of drivers don't work properly without the sync fence,
including intel, llvmpipe and NVIDIA.

Although sync fence is needed, from the information I have gathered (looking
at old bug reports, protocol specifications, look at other compositors' code),
compton's usage of it is not proper. So we need to rewrite it in the future,
after we get more information from driver developers.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-08 18:07:18 +00:00
Yuxuan Shui 2b0b7435df Convert some Xlib constants to xcb
And remove some Xlib headers

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-04 18:58:05 +00:00
Yuxuan Shui 796b0e0448 Move private functions from compton.h to compton.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-03 22:38:33 +00:00
Yuxuan Shui 332a873729 Add --diagnostics option
It will cause compton to print out some rudimentary diagnostics.

Also small improvements of the meson.build.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-03 22:37:18 +00:00
Yuxuan Shui e142993bb5 Enable paint-on-overlay whenever possible
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-03 22:36:52 +00:00
Yuxuan Shui be09a9a835 Workaround compiling with -ffast-math
And add a compiler warning.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-02 13:57:42 +00:00
Yuxuan Shui 45e9530bcb Update bounding shape when a window is mapped
Fixes #35

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-01 21:06:40 +00:00
Yuxuan Shui 4f4201976d Fix signedness of x properties
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-11-01 11:12:46 +00:00
Yuxuan Shui c0d7f9d915 Add damage when restacking windows
Interesting this problem only surface when using GTK applications on
KDE. Maybe on other WMs there are some other events after window
restacking that triggers repaint of the window.

Fixes #28

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-29 17:16:56 +00:00
Yuxuan Shui a312dcb3da Remove a debug message
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-29 13:36:48 +00:00
Yuxuan Shui 50e2259404 Remove xrender-sync and xrender-sync-fence
This was a dubious "fix" for a Nvidia driver problem. The problem was
never fully understood, and the then developers took a shotgun approach
and implemented xsync fences as a fix. Which somehow fixed the problem.
Again, I don't see any indication that the developers understood why
this "fix" worked.

(for details, see chjj/compton#152 and chjj/compton#181)

The driver problem should have been fixed almost 5 years ago. So this
shouldn't be needed anymore. In addition the way compton uses xsync fences
is apparently wrong according to the xsync spec (fences are attached to
screen, but compton uses them as if they were attached to drawables).

So, I will try removing it and see if anyone will complain. If there are
real concrete reasons why fences are needed, it will be brought back.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-28 23:36:55 +00:00
Yuxuan Shui 309a4cec79 Make monitor_repaint an option
This is a potentially useful feature for debugging the xrender backend,
so make it a commandline option rather than an obscure compiler flag.

Also this is only usable with xrender, for glx there are better tools
for debugging.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-25 23:32:10 +01:00
Yuxuan Shui 551d487836 Remove some unused parameters
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-25 23:32:10 +01:00
Yuxuan Shui f519ee53c1 Remove support of Xdbe
--dbe does not seem to have an effect on tearing, as noted in the old
manpage, and confirmed by my own testing.

So remove it, since it complicates the logic of painting.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-25 23:32:10 +01:00
Yuxuan Shui 3ffc0c77ed Replace get_alpha_pict with get_alpha_step
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-25 23:32:10 +01:00
Yuxuan Shui df63cab39a Print messages about removed options
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-24 11:10:35 +01:00
Yuxuan Shui db700f9be1 Fix OOB when the number of screens change 2018-10-22 15:38:45 +01:00
Yuxuan Shui 0b866fb17f Hot fix: trail when moving windows around
Call win_on_factor_change when window is moved. This does some
duplicate work, but fix the problem for now.
2018-10-16 17:16:18 +01:00
Yuxuan Shui aa2098eefd Move w->bounding_shape to local coordinates
This way we don't need to update the bounding region after window moves.

Also add some comments about the coordinate systems in compton.
Also change a few function that takes a `bool global` parameter to
always return region in local coordinates.
2018-10-13 01:24:52 +01:00
Uli Schlachter 9bb3327549 Die when the X11 connection breaks
With libX11, the library calls an I/O error handler if the connection to
the server breaks. The default I/O error handler prints an error message
and calls exit(). This can be seen when running a "pre-xcb" compton
against Xephyr and then closing the Xephyr window:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 241 requests (241 known processed) with 0 events remaining.

The current compton would just continue running. After this commit, it
instead exits with this message:

handle_queued_x_events(): X11 server connection broke (error 1)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:54:05 +01:00
Uli Schlachter 1c1adc96c8 Change event masks to XCB defines
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:54:05 +01:00
Uli Schlachter 37ef9c5b8a Add the xcb_connection_t to session_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-10 10:54:00 +01:00
Uli Schlachter 54807342f4 Convert XQueryTree to XCB
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:50:00 +01:00
Uli Schlachter 6c6156932f Convert find_client_win() to XCB
This function was the only caller of wid_get_children() which called
XQueryTree().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:50:00 +01:00
Uli Schlachter b2bfbcdfb0 Convert XGetAtomName to XCB
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-10 10:49:52 +01:00
Uli Schlachter ca148c8f15 Fix printf format with DEBUG_EVENTS
Xlib uses unsigned long for XIDs, but xcb always uses uint32_t. Thus,
this needs the format string for uint32_t now.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:46:39 +01:00
Uli Schlachter 2da0ecdf66 Convert XSelectInput() to XCB
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-10 10:42:12 +01:00
Uli Schlachter 1b1b3456bc Convert XGetSelectionOwner to XCB
This also fixes a memory leak: buf was not freed if another composite
manager was already running.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter 2dc90e7d4d Convert XGetInputFocus to XCB
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter 8db6473d32 Convert property management to XCB
I removed the error checking in compton.c because it was dead code.
XChangeProperty() always returns 1.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter a192bfb130 Replace XSetSelectionOwner with XCB
Note that the argument order is different between Xlib and XCB.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter 0cae42faaa Replace XDestroyWindow with xcb_destroy_window
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter e30ff25dd3 Replace XClearArea with xcb_clear_area
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter 28e9488e25 XCBify XCreateGC and XFreeGC
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter b86190452c XCBify X{Ung,G}abServer
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Uli Schlachter 3c5d7555a4 XCBify X{Unm,M}apWindow
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-10 10:41:40 +01:00
Yuxuan Shui 6a8df0ada7 Fix a leak of XFIXES regions 2018-10-09 22:24:00 +01:00
Yuxuan Shui 7b755a3cf0 Fix typo in CONTRIBUTORS, move licenses around
Having a LICENSE file makes github happy
2018-10-03 22:24:12 +01:00
Yuxuan Shui ee318582f5 Sort out license problems
IANAL, but I think I am allowed to add missing copyright notices for
someone else. And I did my best job using git history to figure out who
wrote which functions. So I hope everything is fine.
2018-10-03 22:14:51 +01:00
Yuxuan Shui f1872c4033 Allocation for xinerama_scr_regs used wrong size
Should be sizeof(region_t). Rebasing is hard :(
2018-10-03 16:19:48 +01:00
Yuxuan Shui 2a4fed50f4 Use libev for inputs and timeouts
Bugs:

* There seems to be a noticeable frame loss when window
  is being opened/closed. But the same problem also exists
  in master/next, so this is not a regression.
* Using --sw-opti and --benchmark at the same time causing
  compton to draw more frequently than permitted by the
  arguments. That is because the sleep interval calculation
  is flawed. Not really a regression either.

Verified still working:

* Usual painting
* Fade
* Benchmark mode
* --sw-opti (with or without benchmark mode)
* DBus
* Unredir delay

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-10-03 01:05:32 +01:00
yshui e58de49d7a
Merge pull request #10 from psychon/remove-xfixes
Some more trivial Xlib -> XCB conversions
2018-10-02 21:38:28 +01:00
Yuxuan Shui d917ec22a8 Fix a typo in conversion to xcb damage 2018-10-02 21:25:09 +01:00
Uli Schlachter bc7767e086 Replace Xlib atom constants with XCB ones
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-02 19:53:28 +02:00
Uli Schlachter 7c174cc3b1 Replace XserverRegion with xcb_xfixes_region_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-02 19:50:27 +02:00
Yuxuan Shui cb4bab1cf6 Print deprecation warning for removed OpenGL options
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 21:07:29 +01:00
Yuxuan Shui 03f33ed45c Move a couple X related functions to x.c
Also replace remaining Pixmap with xcb_pixmap_t

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 20:57:42 +01:00
Yuxuan Shui 6a41bebfa5 Just clear shadow anyways
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 20:12:06 +01:00
Yuxuan Shui 97cd3421b0 Remove last bits of Xfixes
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 15:54:12 +01:00
Yuxuan Shui ff27ca4072 Move xerror_common to x.c
Also rename it to x_print_error

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 15:54:12 +01:00
Yuxuan Shui 28a2cc62fa Convert XfixesRegion to pixman region
Re-did the painting logic, and document it.

It is unclear to me what is the previous painting logic. But the current
one is basically this:

1. Go through all windows top to bottom, and put visible windows (not
   unmapped, opacity > 0, etc) into a linked list, from bottom to top
2. Accumulate a region of ignore on each window, which is basically the
   region of screen that is obscured by all the windows above current
   one.
3. Paint all the visible windows from bottom to top. Subtract the region
   of ignore from the painting region. If we need to paint shadow, we
   subtract the body of the window from the shadow painting region too,
   because we don't want shadow behind the window.
4. region of ignore is invalidated when window stack change, an
   window on top moved or changed shape, when window changed between
   opaque and transparent, etc.

Notes:

It is unclear whether all the different shapes of a window (extents,
noframe, border, bounding shape, etc) are calculated correctly or not.

It is unclear if window shape related events are handled correctly or
not. Need more testing.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 14:18:33 +01:00
Yuxuan Shui ab12467c3f Change fade callback function parameter
Change `win *` to `win **`, because a window could be freed by the
callback, so we can set `*w` to NULL to communicate that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 14:18:33 +01:00
Yuxuan Shui 417744df14 Move opengl related function prototype to opengl.h
And aggregate some of the OPENGL ifdefs

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 14:18:01 +01:00
Yuxuan Shui c01ad5bf04 Move OpenGL functions around
Also remove some debug function calls (there are better tools for opengl
debugging now). Also remove copysubbuffermesa

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 13:49:45 +01:00
Yuxuan Shui 90b6aa16ad Remove ARGB as a window mode
Instead use win_has_alpha to check for alpha channel, window mode is
reserved for determine if the window is possibly transparent.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-30 13:49:45 +01:00
Uli Schlachter 8848676540 Add a function that allocates a pixmap and checks success
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-30 09:31:22 +02:00
yshui 6ec951763e
Merge branch 'next' into more-xcb-conv 2018-09-30 04:53:34 +01:00
Uli Schlachter aedea014a9 Replace XFixes initialisation with xcb
XFixesQueryExtension() does an XFixes QueryVersion request internally,
so one was added here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-29 17:02:44 +01:00
Uli Schlachter 529306e65f Convert usage of XCreatePixmap to xcb
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-29 12:00:18 +02:00
Uli Schlachter ea9942b87e Replace use of XFreePixmap with XCB
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-29 11:53:30 +02:00
Uli Schlachter 9dff55540f Convert Xinerama usage to xcb
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-09-29 11:48:58 +02:00