From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Gtk tabs in emacs, new branch. Date: Sat, 10 Apr 2010 11:56:53 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <4BB49A8F.3000307@swipnet.se> <87bpe312n3.fsf@mail.jurta.org> <4BB4FE62.1010706@swipnet.se> <876340mcda.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1270868232 5750 80.91.229.12 (10 Apr 2010 02:57:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Apr 2010 02:57:12 +0000 (UTC) Cc: emacs-devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 10 04:57:10 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Qsf-0000bN-Hk for ged-emacs-devel@m.gmane.org; Sat, 10 Apr 2010 04:57:09 +0200 Original-Received: from localhost ([127.0.0.1]:34654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Qsf-0000pa-2Y for ged-emacs-devel@m.gmane.org; Fri, 09 Apr 2010 22:57:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0QsZ-0000oA-Pa for emacs-devel@gnu.org; Fri, 09 Apr 2010 22:57:03 -0400 Original-Received: from [140.186.70.92] (port=52377 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0QsY-0000ms-0d for emacs-devel@gnu.org; Fri, 09 Apr 2010 22:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0QsS-0008R6-Qh for emacs-devel@gnu.org; Fri, 09 Apr 2010 22:57:01 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52481) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0QsS-0008QR-7c for emacs-devel@gnu.org; Fri, 09 Apr 2010 22:56:56 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id B3E58C0557; Sat, 10 Apr 2010 11:56:53 +0900 (JST) In-Reply-To: <876340mcda.fsf@mail.jurta.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123421 Archived-At: >>>>> On Sat, 10 Apr 2010 02:27:45 +0300, Juri Linkov said: > I've published a new branch that implements tabs for non-toolkit X > builds. It is at bzr.savannah.gnu.org/srv/bzr/emacs/x-tabs. The > tab bar is modelled after the tool bar. Tab functions share some > similarities with frame-, window- and buffer-related functions (same > name conventions, etc.) The following patch will make a few things more consistent with my 2010-01-09 changes. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/window.h' *** src/window.h 2010-04-09 23:19:38 +0000 --- src/window.h 2010-04-10 01:34:30 +0000 *************** *** 415,425 **** (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) /* Return the frame y-position at which window W starts. This includes a header line, if any. */ #define WINDOW_TOP_EDGE_Y(W) \ ! (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) --- 415,431 ---- (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) + /* 1 if W is a tab bar window. */ + + #define WINDOW_TAB_BAR_P(W) \ + (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \ + && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window)) + /* Return the frame y-position at which window W starts. This includes a header line, if any. */ #define WINDOW_TOP_EDGE_Y(W) \ ! (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) *************** *** 427,433 **** This includes a mode line, if any. */ #define WINDOW_BOTTOM_EDGE_Y(W) \ ! (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) --- 433,439 ---- This includes a mode line, if any. */ #define WINDOW_BOTTOM_EDGE_Y(W) \ ! (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W)) === modified file 'src/xfns.c' *** src/xfns.c 2010-04-09 23:19:38 +0000 --- src/xfns.c 2010-04-10 02:35:00 +0000 *************** *** 1540,1546 **** { int height = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); ! int y = nlines * FRAME_LINE_HEIGHT (f); /* height can be zero here. */ if (height > 0 && width > 0) --- 1540,1547 ---- { int height = FRAME_INTERNAL_BORDER_WIDTH (f); int width = FRAME_PIXEL_WIDTH (f); ! int y = (FRAME_MENU_BAR_LINES (f) + FRAME_TOOL_BAR_LINES (f) ! + nlines) * FRAME_LINE_HEIGHT (f); /* height can be zero here. */ if (height > 0 && width > 0) === modified file 'src/xterm.c' *** src/xterm.c 2010-04-09 23:19:38 +0000 --- src/xterm.c 2010-04-10 02:31:59 +0000 *************** *** 751,761 **** { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); - /* Internal border is drawn below the tab bar. */ - if (WINDOWP (f->tab_bar_window) - && w == XWINDOW (f->tab_bar_window)) - y -= width; - BLOCK_INPUT; x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, y, width, height, False); --- 751,756 ----