From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: About x_draw_xwidget_glyph_string Date: Mon, 25 Jan 2016 17:46:00 +0200 Message-ID: <83oac93bnr.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453736761 3604 80.91.229.3 (25 Jan 2016 15:46:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jan 2016 15:46:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 25 16:46:01 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aNjL5-0008RE-Ou for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 16:45:59 +0100 Original-Received: from localhost ([::1]:39369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjL5-0007vk-8c for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 10:45:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjKm-0007so-Oh for emacs-devel@gnu.org; Mon, 25 Jan 2016 10:45:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNjKi-0005pJ-On for emacs-devel@gnu.org; Mon, 25 Jan 2016 10:45:40 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjKi-0005pA-MT; Mon, 25 Jan 2016 10:45:36 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4728 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aNjKi-0006CN-1Z; Mon, 25 Jan 2016 10:45:36 -0500 In-reply-to: (message from YAMAMOTO Mitsuharu on Mon, 25 Jan 2016 11:07:16 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198775 Archived-At: > Date: Mon, 25 Jan 2016 11:07:16 +0900 > From: YAMAMOTO Mitsuharu > > 2. Comment on clipping. > > 578 /* Calculate clipping, which is used for all manner of onscreen > 579 xwidget views. Each widget border can get clipped by other emacs > 580 objects so there are four clipping variables. */ > 581 clip_right = > 582 min (xww->width, > 583 WINDOW_RIGHT_EDGE_X (s->w) - x - > 584 WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w) - > 585 WINDOW_RIGHT_FRINGE_WIDTH (s->w)); > 586 clip_left = > 587 max (0, > 588 WINDOW_LEFT_EDGE_X (s->w) - x + > 589 WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (s->w) + > 590 WINDOW_LEFT_FRINGE_WIDTH (s->w)); > 591 > 592 clip_bottom = > 593 min (xww->height, > 594 WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT (s->w) - y); > 595 clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y); > > I think the calculation of clipping should use the function window_box > rather than manual calculation with various window macros. Otherwise, > xwidget views will cover horizontal scroll bars, for example. I agree. Thanks.