Agar-SVN | 1 Nov 04:20 2009

Agar: r8498 - trunk/gui

Author: vedge
Date: 2009-11-01 00:20:15 -0300 (Sun, 01 Nov 2009)
New Revision: 8498

Modified:
   trunk/gui/window.c
Log:
hide window before detaching tbar in Detach()

Modified: trunk/gui/window.c
===================================================================
--- trunk/gui/window.c	2009-10-30 14:27:24 UTC (rev 8497)
+++ trunk/gui/window.c	2009-11-01 03:20:15 UTC (rev 8498)
 <at>  <at>  -244,6 +244,10  <at>  <at> 
 	if (drv == NULL || !AG_ObjectIsClass(drv, "AG_Driver:*"))
 		AG_FatalError("Window is not attached to a Driver");
 #endif
+	/* Implicitely hide the window. */
+	if (win->visible)
+		AG_WindowHide(win);
+
 	/* The window's titlebar and icon are no longer safe to use. */
 	if (win->tbar != NULL) {
 		AG_ObjectDetach(win->tbar);
 <at>  <at>  -262,9 +266,6  <at>  <at> 
 		agWindowToFocus = NULL;
 	}
 	
-	/* Implicitely hide the window. */
-	AG_WindowHide(win);
(Continue reading)

Agar-SVN | 1 Nov 04:21 2009

Agar: r8499 - trunk/gui

Author: vedge
Date: 2009-11-01 00:21:13 -0300 (Sun, 01 Nov 2009)
New Revision: 8499

Modified:
   trunk/gui/AG_Window.3
   trunk/gui/window.h
Log:
deprecate AG_WindowSelectedWM() and AG_WindowSetVisibility().

Modified: trunk/gui/AG_Window.3
===================================================================
--- trunk/gui/AG_Window.3	2009-11-01 03:20:15 UTC (rev 8498)
+++ trunk/gui/AG_Window.3	2009-11-01 03:21:13 UTC (rev 8499)
 <at>  <at>  -411,46 +411,25  <at>  <at> 
 .Ft int
 .Fn AG_WindowIsVisible "AG_Window *win"
 .Pp
-.Ft int
-.Fn AG_WindowSelectedWM "AG_Window *win" "enum ag_wm_operation op"
-.Pp
-.Ft int
-.Fn AG_WindowSetVisibility "AG_Window *win" "int flag"
-.Pp
 .nr nS 0
+Newly created windows are invisible by default.
 The
 .Fn AG_WindowShow
-and
+function makes the specified window visible.
(Continue reading)

Agar-SVN | 1 Nov 04:24 2009

Agar: r8500 - trunk/gui

Author: vedge
Date: 2009-11-01 00:24:50 -0300 (Sun, 01 Nov 2009)
New Revision: 8500

Modified:
   trunk/gui/drv_glx.c
   trunk/gui/menu.c
   trunk/gui/menu.h
   trunk/gui/menu_view.c
   trunk/gui/style_default.c
Log:
- fix AG_Menu/AG_MenuView crash in MW mode; cached surfaces must be associated
  with the proper AG_MenuView independently of AG_Menu.
- remove MenuItemBackground() operation.

Modified: trunk/gui/drv_glx.c
===================================================================
--- trunk/gui/drv_glx.c	2009-11-01 03:21:13 UTC (rev 8499)
+++ trunk/gui/drv_glx.c	2009-11-01 03:24:50 UTC (rev 8500)
 <at>  <at>  -1918,7 +1918,9  <at>  <at> 
 	AGDRIVER_MW(glx)->flags |= AG_DRIVER_MW_OPEN;

 	/* XXX */
-	XMoveWindow(agDisplay, glx->w, r.x, r.y);
+	if (!(win->flags & AG_WINDOW_NOTITLE)) {
+		XMoveWindow(agDisplay, glx->w, r.x, r.y);
+	}

 	/* Create a GLX context and initialize state. */
 	glx->glxCtx = glXCreateContext(agDisplay, xvi, 0, GL_FALSE);
(Continue reading)

Agar-SVN | 1 Nov 06:08 2009

Agar: r8501 - trunk/demos

Author: vedge
Date: 2009-11-01 01:08:11 -0400 (Sun, 01 Nov 2009)
New Revision: 8501

Removed:
   trunk/demos/objprops/
Modified:
   trunk/demos/Makefile
Log:
- objprops

Modified: trunk/demos/Makefile
===================================================================
--- trunk/demos/Makefile	2009-11-01 03:24:50 UTC (rev 8500)
+++ trunk/demos/Makefile	2009-11-01 05:08:11 UTC (rev 8501)
 <at>  <at>  -9,7 +9,6  <at>  <at> 
 	textbox \
 	themes \
 	maximized \
-	objprops \
 	unitconv \
 	sockets \
 	glview \
Agar-SVN | 2 Nov 03:11 2009

Agar: r8502 - in trunk: gui rg

Author: vedge
Date: 2009-11-01 22:11:39 -0400 (Sun, 01 Nov 2009)
New Revision: 8502

Modified:
   trunk/gui/AG_Menu.3
   trunk/gui/hsvpal.c
   trunk/gui/menu.c
   trunk/gui/menu.h
   trunk/gui/menu_view.c
   trunk/gui/table.c
   trunk/gui/tlist.c
   trunk/rg/animview.c
   trunk/rg/feature.c
   trunk/rg/pixmap.c
   trunk/rg/sketch.c
   trunk/rg/tile.c
Log:
fix popup menu and menu collapse behavior under MW drivers.

Modified: trunk/gui/AG_Menu.3
===================================================================
--- trunk/gui/AG_Menu.3	2009-11-01 05:08:11 UTC (rev 8501)
+++ trunk/gui/AG_Menu.3	2009-11-02 02:11:39 UTC (rev 8502)
 <at>  <at>  -132,7 +132,11  <at>  <at> 
 .Ft AG_Menu
 or
 .Ft AG_MenuView
-widget.
+widget (the
(Continue reading)

Agar-SVN | 2 Nov 03:15 2009

Agar: r8503 - trunk/gui

Author: vedge
Date: 2009-11-01 22:15:15 -0400 (Sun, 01 Nov 2009)
New Revision: 8503

Modified:
   trunk/gui/AG_Window.3
   trunk/gui/drv_sw.c
   trunk/gui/drv_sw.h
   trunk/gui/window.c
   trunk/gui/window.h
Log:
move WM-specific window alignment settings to DriverSw structure.

Modified: trunk/gui/AG_Window.3
===================================================================
--- trunk/gui/AG_Window.3	2009-11-02 02:11:39 UTC (rev 8502)
+++ trunk/gui/AG_Window.3	2009-11-02 02:15:15 UTC (rev 8503)
 <at>  <at>  -211,11 +211,7  <at>  <at> 
 function configures an alternate icon for the window.
 This icon will be used by Agar's internal window manager whenever the window
 is minimized.
-The given surface will be duplicated and can be of any size, but the recommended
-default size is given by
-.Va agWindowIconWidth
-and
-.Va agWindowIconHeight .
+The given surface will be duplicated and rescaled if necessary.
 The
 .Fn AG_WindowSetIconNODUP
 variant does not duplicate the provided surface, which must remain valid until
(Continue reading)

Agar-SVN | 3 Nov 02:55 2009

Agar: r8504 - trunk/gui

Author: vedge
Date: 2009-11-02 21:55:12 -0400 (Mon, 02 Nov 2009)
New Revision: 8504

Modified:
   trunk/gui/menu_view.c
Log:
invoke AG_MenuCollapseAll() only after a meaningful action.

Modified: trunk/gui/menu_view.c
===================================================================
--- trunk/gui/menu_view.c	2009-11-02 02:15:15 UTC (rev 8503)
+++ trunk/gui/menu_view.c	2009-11-03 01:55:12 UTC (rev 8504)
 <at>  <at>  -203,7 +203,8  <at>  <at> 
 	int i;

 	if (my < 0 || mx < 0) {
-		goto collapse;
+		AG_MenuCollapse(m, mi);
+		goto out;
 	}
 	for (i = 0; i < mi->nsubitems; i++) {
 		AG_MenuItem *item = &mi->subitems[i];
 <at>  <at>  -213,10 +214,12  <at>  <at> 
 		y += m->itemh;
 		if (my < y && mx >= 0 && mx <= WIDTH(mview)) {
 			if (item->state == 0) {
-				goto collapse;
+				AG_MenuCollapse(m, mi);
+				goto out;
(Continue reading)

Agar-SVN | 3 Nov 02:56 2009

Agar: r8505 - trunk/gui

Author: vedge
Date: 2009-11-02 21:56:23 -0400 (Mon, 02 Nov 2009)
New Revision: 8505

Modified:
   trunk/gui/window.c
Log:
use setWindowCaption() in MW mode.

Modified: trunk/gui/window.c
===================================================================
--- trunk/gui/window.c	2009-11-03 01:55:12 UTC (rev 8504)
+++ trunk/gui/window.c	2009-11-03 01:56:23 UTC (rev 8505)
 <at>  <at>  -186,30 +186,33  <at>  <at> 
 	 */
 	AG_PostEvent(drv, win, "attached", NULL);
 	
-	/*
-	 * Initialize the window and titlebars now that we have an attached
-	 * driver. We cannot do this earlier because surface mapping operations
-	 * are involved.
-	 */
-	if (AGDRIVER_SINGLE(drv) && !(win->flags & AG_WINDOW_NOTITLE)) {
-		Uint titlebarFlags = 0;
+	if (AGDRIVER_SINGLE(drv)) {
+		/*
+		 * Initialize the built-in window titlebar and icon now that
+		 * we have an attached driver. We could not do this earlier
+		 * because surface operations are involved.
+		 */
(Continue reading)

Agar-SVN | 3 Nov 02:57 2009

Agar: r8506 - trunk/gui

Author: vedge
Date: 2009-11-02 21:57:26 -0400 (Mon, 02 Nov 2009)
New Revision: 8506

Modified:
   trunk/gui/drv.c
   trunk/gui/drv.h
   trunk/gui/drv_glx.c
   trunk/gui/drv_mw.h
   trunk/gui/drv_sdlfb.c
   trunk/gui/editable.c
   trunk/gui/text.c
   trunk/gui/text.h
Log:
move the glyph cache to the AG_Driver structure to avoid texture management
complications.

Modified: trunk/gui/drv.c
===================================================================
--- trunk/gui/drv.c	2009-11-03 01:56:23 UTC (rev 8505)
+++ trunk/gui/drv.c	2009-11-03 01:57:26 UTC (rev 8506)
 <at>  <at>  -35,6 +35,7  <at>  <at> 
 #include <core/config.h>

 #include "window.h"
+#include "text.h"

 #ifdef HAVE_GLX
 extern AG_Driver agDriverGLX;
 <at>  <at>  -146,6 +147,7  <at>  <at> 
(Continue reading)

Agar-SVN | 4 Nov 05:26 2009

Agar: r8508 - in trunk: core gui p5-Agar p5-Agar/Agar rg

Author: vedge
Date: 2009-11-04 00:26:03 -0400 (Wed, 04 Nov 2009)
New Revision: 8508

Modified:
   trunk/core/object.c
   trunk/gui/AG_Menu.3
   trunk/gui/drv_glx.c
   trunk/gui/drv_mw.h
   trunk/gui/drv_sw.c
   trunk/gui/drv_sw.h
   trunk/gui/menu.c
   trunk/gui/menu.h
   trunk/gui/menu_view.c
   trunk/gui/window.c
   trunk/p5-Agar/Agar/Menu.pm
   trunk/p5-Agar/Menu.xs
   trunk/rg/pixmap.c
Log:
- pass the appropriate hints to Motif/Gnome/KWM compliant WMs; don't set a
  PPosition if the Agar window's position is undefined.
- set the WM_TRANSIENT_FOR hint to match AG_WindowAttach().
- fix incorrect AG_MenuExpand() location under SW drivers.
- pass correct window size to AG_WM_GetPrefPosition().
- fix AG_PopupShow() to match 1.3 behavior.

Modified: trunk/core/object.c
===================================================================
--- trunk/core/object.c	2009-11-04 02:14:16 UTC (rev 8507)
+++ trunk/core/object.c	2009-11-04 04:26:03 UTC (rev 8508)
(Continue reading)


Gmane