Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:21:42+00:00 2026-05-26T01:21:42+00:00

I want to give a window a specific property only when it is maximised

  • 0

I want to give a window a specific property only when it is maximised and change it back when the maximised state ends. I am using Gtk# , but all GTK binding answers are welcome. What I am looking for is something like this (pseudocode):

 OnMaximise += new Mhandler();
 Mhandler(){ property = true;}

or:

Resize += delegate() {
     if (isMaximised()) property=true; else property = false;};

or the C way:

gtk_window_on_maximise(GTK_WINDOW(mwin),onmax);
void onmax() 
{ 
     if (gtk_window_is_max(GTK_WINDOW(mwin))        
          gtk_window_set_property(GTK_WINDOW(mwin),true); 
     else gtk_window_set_property(GTK_WINDOW(mwin),false);
}

Any suggestions? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:21:42+00:00Added an answer on May 26, 2026 at 1:21 am

    Set up the “window-state-event” signal when you create the window and watch for it. See http://developer.gnome.org/gtk/2.24/GtkWindow.html#gtk-window-maximize
    and also
    http://developer.gnome.org/gtk/2.24/GtkWidget.html#GtkWidget-window-state-event

    Your onmax() would be the handler that would be called when GDK_WINDOW_STATE_MAXIMIZED becomes TRUE.
    See http://developer.gnome.org/gdk/stable/gdk-Events.html#GDK-STRUCTURE-MASK:CAPS
    and http://developer.gnome.org/gdk/stable/gdk-Event-Structures.html#GdkEventWindowState
    and http://developer.gnome.org/gdk/stable/gdk-Event-Structures.html#GdkWindowState

    Sorry, can’t help much more than that without actually writing code. Google might have some good examples and then again might not. What documentation there is actually is for people who can already do GTK+ signals.

    EDIT: I do GTK+ in C and the pages I cited are for C.

    EDIT #2: The handler (callback) is executed whenever the signal is sent and the signal data is what matters. I would probably do a switch:case on each signal data value that interested me and possibly set a flag for other functions to read later on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

yes i want to get a child window of another application. Give me Sum
I want to give credit to all open source libraries we use in our
I want to give a link to a postscript file, but first I want
I want to give a user access to a stored procedure, but not to
I want to automatically close a fancybox iframe, but I want to give it
I want to give Windows Server 2008 a try as a .NET developer and
I am working on a Windows Phone 7 app and I want to give
I want to give a minimal js code to random websites so that they
I want to give integer input to Ruby like this: 12 343 12312 12312
I want to give zoom effect to the iPhone camera image while capturing the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.