Merge remote-tracking branch 'daenzer/for-master'
This commit is contained in:
commit
3735ab965a
|
@ -1424,18 +1424,21 @@ glamor_composite_clipped_region(CARD8 op,
|
|||
if (!mask && !source->alphaMap && !dest->alphaMap
|
||||
&& source->pDrawable && !source->transform
|
||||
&& ((op == PictOpSrc
|
||||
&& ((source->format == dest->format
|
||||
|| (PICT_FORMAT_COLOR(dest->format)
|
||||
&& PICT_FORMAT_COLOR(source->format)
|
||||
&& dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format),
|
||||
PICT_FORMAT_TYPE(source->format),
|
||||
0,
|
||||
PICT_FORMAT_R(source->format),
|
||||
PICT_FORMAT_G(source->format),
|
||||
PICT_FORMAT_B(source->format))))
|
||||
|| (op == PictOpOver
|
||||
&& source->format == dest->format
|
||||
&& !PICT_FORMAT_A(source->format)))))) {
|
||||
&& (source->format == dest->format
|
||||
|| (PICT_FORMAT_COLOR(dest->format)
|
||||
&& PICT_FORMAT_COLOR(source->format)
|
||||
&& dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format),
|
||||
PICT_FORMAT_TYPE(source->format),
|
||||
0,
|
||||
PICT_FORMAT_R(source->format),
|
||||
PICT_FORMAT_G(source->format),
|
||||
PICT_FORMAT_B(source->format)))))
|
||||
|| (op == PictOpOver
|
||||
&& source->format == dest->format
|
||||
&& !PICT_FORMAT_A(source->format)))
|
||||
&& x_source >= 0 && y_source >= 0
|
||||
&& (x_source + width) <= source->pDrawable->width
|
||||
&& (y_source + height) <= source->pDrawable->height) {
|
||||
x_source += source->pDrawable->x;
|
||||
y_source += source->pDrawable->y;
|
||||
x_dest += dest->pDrawable->x;
|
||||
|
|
|
@ -508,11 +508,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (pScrn->pScreen &&
|
||||
!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE))
|
||||
xf86_reload_cursors(pScrn->pScreen);
|
||||
#endif
|
||||
done:
|
||||
if (!ret) {
|
||||
crtc->x = saved_x;
|
||||
|
|
|
@ -968,14 +968,10 @@ extern _X_EXPORT Bool
|
|||
xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
|
||||
|
||||
/**
|
||||
* Called when anything on the screen is reconfigured.
|
||||
*
|
||||
* Reloads cursor images as needed, then adjusts cursor positions.
|
||||
*
|
||||
* Driver should call this from crtc commit function.
|
||||
* Superseeded by xf86CursorResetCursor, which is getting called
|
||||
* automatically when necessary.
|
||||
*/
|
||||
extern _X_EXPORT void
|
||||
xf86_reload_cursors(ScreenPtr screen);
|
||||
static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {}
|
||||
|
||||
/**
|
||||
* Called from EnterVT to turn the cursors back on
|
||||
|
|
|
@ -456,7 +456,6 @@ xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src)
|
|||
CARD8 *cursor_image;
|
||||
const Rotation rotation = xf86_crtc_cursor_rotation(crtc);
|
||||
|
||||
xf86_config->cursor = xf86CurrentCursor(xf86ScrnToScreen(scrn));
|
||||
crtc->cursor_argb = FALSE;
|
||||
|
||||
if (rotation == RR_Rotate_0)
|
||||
|
@ -493,6 +492,7 @@ xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
xf86_config->cursor = xf86CurrentCursor(scrn->pScreen);
|
||||
for (c = 0; c < xf86_config->num_crtc; c++) {
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
|
@ -640,63 +640,6 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags)
|
|||
return xf86InitCursor(screen, cursor_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when anything on the screen is reconfigured.
|
||||
*
|
||||
* Reloads cursor images as needed, then adjusts cursor positions
|
||||
* @note We assume that all hardware cursors to be loaded have already been
|
||||
* found to be usable by the hardware.
|
||||
*/
|
||||
|
||||
void
|
||||
xf86_reload_cursors(ScreenPtr screen)
|
||||
{
|
||||
ScrnInfoPtr scrn;
|
||||
xf86CrtcConfigPtr xf86_config;
|
||||
xf86CursorInfoPtr cursor_info;
|
||||
CursorPtr cursor;
|
||||
int x, y;
|
||||
xf86CursorScreenPtr cursor_screen_priv;
|
||||
|
||||
/* initial mode setting will not have set a screen yet.
|
||||
May be called before the devices are initialised.
|
||||
*/
|
||||
if (!screen || !inputInfo.pointer)
|
||||
return;
|
||||
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
|
||||
xf86CursorScreenKey);
|
||||
/* return if HW cursor is inactive, to avoid displaying two cursors */
|
||||
if (!cursor_screen_priv || !cursor_screen_priv->isUp)
|
||||
return;
|
||||
|
||||
scrn = xf86ScreenToScrn(screen);
|
||||
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
/* make sure the cursor code has been initialized */
|
||||
cursor_info = xf86_config->cursor_info;
|
||||
if (!cursor_info)
|
||||
return;
|
||||
|
||||
cursor = xf86CurrentCursor(screen);
|
||||
GetSpritePosition(inputInfo.pointer, &x, &y);
|
||||
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
||||
(*cursor_info->HideCursor) (scrn);
|
||||
|
||||
if (cursor) {
|
||||
void *src =
|
||||
dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey,
|
||||
screen);
|
||||
if (cursor->bits->argb && xf86DriverHasLoadCursorARGB(cursor_info))
|
||||
xf86DriverLoadCursorARGB(cursor_info, cursor);
|
||||
else if (src)
|
||||
xf86DriverLoadCursorImage(cursor_info, src);
|
||||
|
||||
x += scrn->frameX0 + cursor_screen_priv->HotX;
|
||||
y += scrn->frameY0 + cursor_screen_priv->HotY;
|
||||
(*cursor_info->SetCursorPosition) (scrn, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up CRTC-based cursor code
|
||||
*/
|
||||
|
|
|
@ -1131,19 +1131,20 @@ ComputeLocalClient(ClientPtr client)
|
|||
* is forwarded from another host via SSH
|
||||
*/
|
||||
if (cmdname) {
|
||||
char **cmd;
|
||||
char *cmd = strdup(cmdname);
|
||||
Bool ret;
|
||||
|
||||
/* Cut off any colon and whatever comes after it, see
|
||||
* https://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html
|
||||
*/
|
||||
cmd = xstrtokenize(cmdname, ":");
|
||||
cmd = strtok(cmd, ":");
|
||||
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
cmd[0] = basename(cmd[0]);
|
||||
ret = strcmp(basename(cmd), "ssh") != 0;
|
||||
#else
|
||||
ret = strcmp(cmd, "ssh") != 0;
|
||||
#endif
|
||||
|
||||
ret = strcmp(cmd[0], "ssh") != 0;
|
||||
free(cmd);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue
Block a user