diff options
author | Maximilianum <Maximilianum@web> | 2012-12-11 06:53:45 -0800 |
---|---|---|
committer | XCB site <xcb@freedesktop.org> | 2012-12-11 06:53:45 -0800 |
commit | ff975e5945483adf159a8f1c68c732d00debc8aa (patch) | |
tree | 4b68389d779e2b77ba41e426eedf80c60e3292cd | |
parent | cc4d811d171844b87982fbbb81e4537ede036a64 (diff) |
changed fro WM_NAME, WM_ICON_NAME and STRING to XCB_ATOM_WM_NAME, XCB_ATOM_WM_ICON_NAME and XCB_ATOM_STRING. Corrected comment about resize window, width = 200, height = 300
-rw-r--r-- | windowcontextandmanipulation.mdwn | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/windowcontextandmanipulation.mdwn b/windowcontextandmanipulation.mdwn index 1527ae6..dc51992 100644 --- a/windowcontextandmanipulation.mdwn +++ b/windowcontextandmanipulation.mdwn @@ -29,7 +29,7 @@ The mode parameter coud be one of the following values (defined in enumeration x ### 2. Setting the window name and icon name -The first thing we want to do would be to set the name for our window. This is done using the xcb_change_property() function. This name may be used by the window manager as the title of the window (in the title bar), in a task list, etc. The property atom to use to set the name of a window is WM_NAME (and WM_ICON_NAME for the iconified window) and its type is STRING. Here is an example of utilization: +The first thing we want to do would be to set the name for our window. This is done using the xcb_change_property() function. This name may be used by the window manager as the title of the window (in the title bar), in a task list, etc. The property atom to use to set the name of a window is XCB_ATOM_WM_NAME (and XCB_ATOM_WM_ICON_NAME for the iconified window) and its type is XCB_ATOM_STRING. Here is an example of utilization: #include <string.h> @@ -68,8 +68,8 @@ The first thing we want to do would be to set the name for our window. This is d xcb_change_property (connection, XCB_PROP_MODE_REPLACE, window, - WM_NAME, - STRING, + XCB_ATOM_WM_NAME, + XCB_ATOM_STRING, 8, strlen (title), title ); @@ -81,8 +81,8 @@ The first thing we want to do would be to set the name for our window. This is d xcb_change_property (connection, XCB_PROP_MODE_REPLACE, windows, - WM_ICON_NAME, - STRING, + XCB_ATOM_WM_ICON_NAME, + XCB_ATOM_STRING, 8, strlen(iconTitle), iconTitle); @@ -166,7 +166,7 @@ Yet another operation we can do is to change the size of a window. This is done const static uint32_t values[] = { 200, 300 }; - /* Resize the window to width = 10 and height = 20 */ + /* Resize the window to width = 200 and height = 300 */ xcb_configure_window (connection, window, XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, values); We can also combine the move and resize operations using one single call to xcb_configure_window_t: @@ -174,7 +174,7 @@ We can also combine the move and resize operations using one single call to xcb_ const static uint32_t values[] = { 10, 20, 200, 300 }; /* Move the window to coordinates x = 10 and y = 20 */ - /* and resize the window to width = 10 and height = 20 */ + /* and resize the window to width = 200 and height = 300 */ xcb_configure_window (connection, window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, values); ### 5. Changing windows stacking order: raise and lower @@ -361,4 +361,4 @@ You use them as follows: free (attributes); -As for geom, attr has to be freed.
\ No newline at end of file +As for geom, attr has to be freed. |