Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-09 Thread Michel Dänzer
On Don, 2010-07-08 at 14:55 -0700, Jesse Barnes wrote: On Thu, 08 Jul 2010 14:19:23 -0700 Keith Packard kei...@keithp.com wrote: On Thu, 8 Jul 2010 14:06:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: Ok, back to tracking serials then. Unfortunately, using the pixmap

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-09 Thread Jesse Barnes
On Fri, 09 Jul 2010 10:11:35 +0200 Michel Dänzer mic...@daenzer.net wrote: On Don, 2010-07-08 at 14:55 -0700, Jesse Barnes wrote: On Thu, 08 Jul 2010 14:19:23 -0700 Keith Packard kei...@keithp.com wrote: On Thu, 8 Jul 2010 14:06:01 -0700, Jesse Barnes jbar...@virtuousgeek.org

[PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Jesse Barnes
If the root window changes size, we need to re-allocate any DRI2 buffers that share the same pixmap so that they'll pick up the new root pixmap (if the underlying driver ended up creating a new one). So make sure we hook into the ConfigNotify chain in randr, and track root pixmap changes in the

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Jesse Barnes
On Thu, 8 Jul 2010 11:39:01 -0700 Jesse Barnes jbar...@virtuousgeek.org wrote: If the root window changes size, we need to re-allocate any DRI2 buffers that share the same pixmap so that they'll pick up the new root pixmap (if the underlying driver ended up creating a new one). So make sure

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Keith Packard
On Thu, 8 Jul 2010 11:39:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: If the root window changes size, we need to re-allocate any DRI2 buffers that share the same pixmap so that they'll pick up the new root pixmap (if the underlying driver ended up creating a new one). Why is this

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Jesse Barnes
On Thu, 08 Jul 2010 12:26:22 -0700 Keith Packard kei...@keithp.com wrote: On Thu, 8 Jul 2010 11:39:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: If the root window changes size, we need to re-allocate any DRI2 buffers that share the same pixmap so that they'll pick up the new

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Kristian Høgsberg
On Thu, Jul 8, 2010 at 3:30 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: On Thu, 08 Jul 2010 12:26:22 -0700 Keith Packard kei...@keithp.com wrote: On Thu, 8 Jul 2010 11:39:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: If the root window changes size, we need to re-allocate

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Keith Packard
On Thu, 8 Jul 2010 15:47:14 -0400, Kristian Høgsberg k...@bitplanet.net wrote: So the current code handles it as it is, but only because we don't swap window pixmaps for redirected windows. If we want to handle that, we need to check if the window in ConfigureNotify has a DRI2 subwindow and

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Jesse Barnes
Ok, back to tracking serials then. Unfortunately, using the pixmap serial for windows doesn't actually fix this bug. See below, maybe something is wrong with my DRI2DrawableSerial function. Using the drawable serial unconditionally lets things work (just like the old patch). -- Jesse Barnes,

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Keith Packard
On Thu, 8 Jul 2010 14:06:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: Ok, back to tracking serials then. Unfortunately, using the pixmap serial for windows doesn't actually fix this bug. See below, maybe something is wrong with my DRI2DrawableSerial function. Using the drawable

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Jesse Barnes
On Thu, 08 Jul 2010 14:19:23 -0700 Keith Packard kei...@keithp.com wrote: On Thu, 8 Jul 2010 14:06:01 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: Ok, back to tracking serials then. Unfortunately, using the pixmap serial for windows doesn't actually fix this bug. See below,

Re: [PATCH] DRI2: use ConfigNotify to re-allocate buffers if root window changes

2010-07-08 Thread Keith Packard
On Thu, 8 Jul 2010 14:55:34 -0700, Jesse Barnes jbar...@virtuousgeek.org wrote: Ah yep, looks like that was it. Fixed patch below. Kristian and Keith, if it looks ok I'll resubmit with changelog and your reviewed-by tags. Reviewed-by: Keith Packard kei...@keithp.com (weird that