LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-21-2008, 03:58 AM   #1
mirsoft
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Rep: Reputation: 0
Restore Window


How to restore the window position and size since the window been maximined
before using Xlib? Is there have an APIs, or I must write this myself? Who can tell me the result?


3Q
 
Old 05-21-2008, 11:33 AM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Keeping track of a maximized window’s previous state is the job of a window manager. As such, you will need to interface with your window manager to do this. The most “portable” way is to use the EWMH spec. In particular, you will need to send a _NET_WM_STATE event to the root window, with the window id of the desired window in the event. You will want to specify the _NET_WM_STATE_REMOVE action on the _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ properties.

Alternatively, you might use a window-manager-specific message (e.g., through dbus or DCOP). While this will probably take up less code, it will also be non-portable.
 
  


Reply

Tags
restore, xlib


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to restore files using the restore command ? SKYNAT Linux - Newbie 2 12-28-2007 10:26 PM
windowmaker restore window (title bar, scroll bars etc) frieza Linux - Software 2 02-24-2007 10:19 PM
Restore maximized Fluxbox window to normal size newmoon Linux - Software 4 04-24-2006 02:11 PM
Arview 3.2 works with wine, but window doesn't maximize or restore properly. pepeq Linux - Software 0 11-12-2004 09:56 AM
Restore a minimized window in KDE? newtons2k Linux - Newbie 3 11-22-2002 07:35 PM


All times are GMT -5. The time now is 03:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration